for loop with syms variable
3 ビュー (過去 30 日間)
古いコメントを表示
I am trying to make a loop such that will generate c1=cos(th1) c2=cos(th2).....etc, how can I fix this?
syms th th1 th2 th3 th4 th5 th6
for N=1:6
c(N)=cos(th(N));
end
0 件のコメント
採用された回答
madhan ravi
2020 年 6 月 29 日
編集済み: madhan ravi
2020 年 6 月 29 日
% Newer versions
syms th [1, 6]
c = cos(th)
%Older versions
th = sym('th', [1, 6]);
syms(th)
c = cos(th)
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Assumptions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!