while loop for changing vairable
Show older comments
I was curious if I could use a "while" loop to change a value inside a matrix to create a series of matrices. I created an array for theta which is 1x37. I was thinking maybe creating a while loop that could take one index at a time and produce a new matrix. Any help is appreciated, thank you.
theta = [-90:5:90]
m = sind(theta);
n = cosd(theta);
2 Comments
Rik
on 23 Feb 2021
This is an example of the XY problem. You should not presume a while loop is the solution without a clear description of the problem. You haven't described what you want to do with sufficient detail for someone to be able to give an answer.
andrew krugle
on 24 Feb 2021
Accepted Answer
More Answers (0)
Categories
Find more on Loops and Conditional Statements in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!