while loop for changing vairable
이전 댓글 표시
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
Rik
2021년 2월 23일
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
2021년 2월 24일
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!