MATLAB - Please Help!!!!!!!!!!!
Define
>> a=1:12
How many times do each of the following loops execute?
for i=a
i.^2
end
for i=a'
i.^2
end
Would you please explain the steps?
>> a=1:12
How many times do each of the following loops execute?
for i=a
i.^2
end
for i=a'
i.^2
end
Would you please explain the steps?
0
Comments
run it?
Agreed... add a line to display what iteration you're on, and run it.
Thinking like this is fundamental to learning a language. Test and observe (adding extra lines to allow you to see what's happening, if necessary).