Defining values into zeros matrix
2 ビュー (過去 30 日間)
古いコメントを表示
Ilhami Alp Silahtaroglu
2021 年 1 月 5 日
コメント済み: Sriram Tadavarty
2021 年 1 月 5 日
How can i define all s4 values in a FIRSTSPACE?
LOWERLIMIT = 1 ;
UPPERLIMIT = 360 ;
FIRSTSPACE=zeros(LOWERLIMIT,UPPERLIMIT);
for q=(0:1:360)
s4=[(0.096.*cos(q))-(0.168.*sin(q))]
end
0 件のコメント
採用された回答
Sriram Tadavarty
2021 年 1 月 5 日
Hi,
You can directly execute
q= 0:1:360;
s4=[(0.096.*cos(q))-(0.168.*sin(q))]
Regards,
Sriram
3 件のコメント
Sriram Tadavarty
2021 年 1 月 5 日
Using for loop is not apt here.
But, just in-case you only need it as such. Here is it:
LOWERLIMIT = 1 ;
UPPERLIMIT = 361 ;
FIRSTSPACE=zeros(LOWERLIMIT,UPPERLIMIT);
for q=(0:1:360)
FIRSTSPACE(q+1) = [(0.096.*cos(q))-(0.168.*sin(q))];
end
Regards,
Sriram
その他の回答 (0 件)
参考
カテゴリ
Help Center および 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!