L Leo Tường Member Sep 19, 2021 #1 What is the final value of j from the following code? Code: for j=(0:3) j=j+1; end A. Syntactical error B. Declaration error C. 3 D. 4
What is the final value of j from the following code? Code: for j=(0:3) j=j+1; end A. Syntactical error B. Declaration error C. 3 D. 4
L Lê Như Ý New member Sep 19, 2021 #2 Answer: a Explanation: The syntax of for loop in MATLAB does not include parentheses. Here, the counter is introduced within parentheses and hence, there will be an error. Upvote 0 Downvote
Answer: a Explanation: The syntax of for loop in MATLAB does not include parentheses. Here, the counter is introduced within parentheses and hence, there will be an error.