Question: Suppose I run this code , what will be the result of p ? 5. I have the following code: clc; clear; x= [1 12
5. I have the following code: clc; clear; x= [1 12 17 18 19 21 22 28 90 102 2); r = 0; p=0; for k=1:length(x) if( mod (x (1,k),2)-0) r-r+ 6; else p - p + 4; end end
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
