A for / end loop repeats a statement, or a group of statements, a specific number of times. Its generic form is for i =
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
A for / end loop repeats a statement, or a group of statements, a specific number of times. Its generic form is for i =
A for / end loop repeats a statement, or a group of statements, a specific number of times. Its generic form is for i = first: increment: last, statements end Given the Matlab script: A =zeros (5,5); for i = 1:5, A(i,i) end for i =1:4, A(i,i+1) = 2; 2 end a) Explain the program. b) After the execution, what is the value of A? = 1; =
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!