Question: i need to figure out whats wrong with c based on the math function i have and the data i have. Inputs are 3x1 arrays
i need to figure out whats wrong with c based on the math function i have and the data i have. Inputs are 3x1 arrays off every column in the bigger array as pictured


The math function is the the function at the bottom of the first picture, It takes a 3x1 input and if the first spot in the array is even it adds spot 2 and 3. If it's odd it subtracts 3 from 2 and gives absolute value of it. For example, [20;25;10] would output 35 whereas [21;25;10] outputs 15. I need to take every column from the array i have pictured (named Data) and do this function to each.
Data-ones (3,1) fon b3:10 Data(1,b)=Data (1,b1)+Data(1,b2) end Data (2,i)1:10 Data (3,i)10:1:1 Processed,Data * zeros (2,512e(0ata,2)) fon 91:s ize (0,a+2). col-Data (:,q) : r-atath (col); Processed Data (:,9)=r(1:2) : end aisp(rioataj) disp(Data) disp("Processed data") disp(Processed_data) 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). 4. HNBmbel Data =310
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
