Question: use Matlab 8How many times is the disp statement executed? for i=0:9 for j=0:i1 disp(ij) end end 10 b. 100 CLEAR MY CHOICE Given vec


8How many times is the disp statement executed? for i=0:9 for j=0:i1 disp(ij) end end 10 b. 100 CLEAR MY CHOICE Given vec =1:10, which statement below produces the same value of s as does the following script? s=0; for i=1 : length (vec) s= stvec (i)vec(i); a. s= vecivec: b. s s vectvec: c. 5=sum1vec2): d. s=vec2 : e. s=vecvec: Which one of the following scripts prompts the user for a negative number until the user does so? Assume the user enters fnly scalar numbers, i.e., no arrays or strings. a. repeat number = input ('Negative number?'); until number >=0 number = input ( prompt ); end c prompt = 'Negative number? '; while number >0 number = input ( prompt ); end d. prompt = 'Negative number?''; while true number = input (prompt); if number
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
