Question: Suppose I run this code , what will be the result of p ? 5. I have the following code: clc; clear; x= [1 12

Suppose I run this code , what will be the result of p ? Suppose I run this code , what will be the result of

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!