Question: The following is a MATLAB function to calculate begin mathsize 2 0 px style sum from i equals 1 to n of left parenthesis A

The following is a MATLAB function to calculate begin mathsize 20px style sum from i equals 1 to n of left parenthesis A subscript i end style right parenthesis squared, where n is the length of the vector begin mathsize 20px style A with rightwards harpoon with barb upwards on top equals left square bracket A subscript 1 comma space A subscript 2 comma space... space comma space A subscript n right square bracket end style. Fill in the blank to complete the code. Do NOT type space in your answer. Note that MATLAB is case sensitive.
function s = sumUp(A)
% A is a vector here.
s =0;
for i =1:length(A)
s = s +______;
end
end

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!