Math lab Here is a bit of Matlab code that adds two 2Dimensi

Math lab
Here is a bit of Matlab code that adds two 2-Dimensional vectors together, by getting the components and summing the components. Use the blank lines to create a loop using this code, so that any number of vectors can be added, as the code user desires. % these first two lines initialize X and Y so that no \"old\" values contaminate the calculations, and % SO that X and Y can be used in calculations. They do not need to be in the loop. X = 0; Y = 0; % Loop the following segment, using whatever type of loop you like and can make work. You are not required to use all of these lines, if you do not need them.

Solution

sum(a) returns the sum of elements of A along the firstarry dimensionwhose size does not equl 1 if A is a vector ,then sum(A)RETURNS THE SUMOF THE ELEMENTS IFa is matrix, then sum (A)retruns arow vectorcontaining the sum of each column if A is multidimensional array, then sum(A)operates along the first array dimension whose size doesnot equal1treating the elementsas vectors this dimension becomes 1 while the sizes of all otherdimensions remain the same

Math lab Here is a bit of Matlab code that adds two 2-Dimensional vectors together, by getting the components and summing the components. Use the blank lines to

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site