M Minh Tung New member Sep 19, 2021 #1 What is the output of the following code? Code: for j= 4:2 j=j+1 end A. an empty vector, j B. 3 C. 2 D. error
What is the output of the following code? Code: for j= 4:2 j=j+1 end A. an empty vector, j B. 3 C. 2 D. error
N Nguyễn Ngọc Huỳnh New member Sep 19, 2021 #2 Answer: a Explanation: The loop never runs since if we want to decrease the counter value, we will have to introduce the decrement value. The default form, used here, is for increment operation. Hence, the output is an empty vector, j. Upvote 0 Downvote
Answer: a Explanation: The loop never runs since if we want to decrease the counter value, we will have to introduce the decrement value. The default form, used here, is for increment operation. Hence, the output is an empty vector, j.