Question: Using the function and data i have do c (commented stuff was my try) Data=ones (3,10) forb=3:10Data(1,b)=Data(1,b1)+Data(1,b2) end Data(2,:)=1:16 Data(3,:)1:1:1 * Data=[ 123:456;789] Processed_data=zeros (size(Data))
![my try) Data=ones (3,10) forb=3:10Data(1,b)=Data(1,b1)+Data(1,b2) end Data(2,:)=1:16 Data(3,:)1:1:1 * Data=[ 123:456;789] Processed_data=zeros](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3c501109c4_71266f3c500ac37b.jpg)
Data=ones (3,10) forb=3:10Data(1,b)=Data(1,b1)+Data(1,b2) end Data(2,:)=1:16 Data(3,:)1:1:1 * Data=[ 123:456;789] Processed_data=zeros (size(Data)) * for upitsize ( Data, 2) * Processed_data (i,1) moth ( Data (:,u)) end function a=math(input) If size(input) m [3 1] error( 'Input is not a 31 array of integers") end if mod( input (2),2)= input (2)+input(3) else abs(input(2)-input (3)) end end c) Use a for loop to run the "math" function on every column of "Data" and assign the outputs to "Processed_Data". Once all calculations have been made, display the arrays "Data" and "Processed_Data" in the command window (only display them once)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
