Page 1 of 1

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
by answerhappygod
1 Convert The For Loop In The Following Code Into Matrix Operation 1 Point Use The Profile Tool To Check The Run Tim 1
1 Convert The For Loop In The Following Code Into Matrix Operation 1 Point Use The Profile Tool To Check The Run Tim 1 (31.91 KiB) Viewed 29 times
Please be profesional and do not copy the answer from
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