Page 1 of 1

9. (10 points) For the Matlab code below to generate an identity matrix, Correct the lines which have errors(type your c

Posted: Mon May 16, 2022 1:00 pm
by answerhappygod
9 10 Points For The Matlab Code Below To Generate An Identity Matrix Correct The Lines Which Have Errors Type Your C 1
9 10 Points For The Matlab Code Below To Generate An Identity Matrix Correct The Lines Which Have Errors Type Your C 1 (28.44 KiB) Viewed 52 times
9. (10 points) For the Matlab code below to generate an identity matrix, Correct the lines which have errors(type your correction on the right side of that line): 1. Size = 5; 2. for k = 1:Size 3. for m = 1: size 4. if k = 1 5. Aſk,m) = 0; 6. else 7. Aſk,m) = 1; 8. end 9. End 10.A 10. (2 points) Consider this loop: k = 0; while k < 10 k = k + 4 end How many times will the loop be executed? 11. (5 points) Given : Months = 13.2338 Error=1.2135 Write the fprintf command that will print the following as output Estimated months = 13.234, Error = 1.21