1. Convert the for loop in the following code into matrix operation (1 point). Use the profile tool to check the run tim
Posted: Mon Jun 06, 2022 4:35 pm
other websites
1. Convert the for loop in the following code into matrix operation (1 point). Use the profile tool to check the run time of each line in the code (2 points). Submit the screenshot (of the profile report with the run time of each line) here. % Code vectorization Y = randn (1000000, 1); X = randn (1000000, 1); Z = zeros (1000000, 1); for i = 1:1000000 z (i) = (x(i) *y (i) +y (i) +x (i))/x (i); end