index notation symbolic toolbox
12 ビュー (過去 30 日間)
古いコメントを表示
example: fi = sym('fi',[1 2]) fi =
[ fi1, fi2]
I want this to be: fi =
[ fi(1), fi(2)]
This in order to use outcome of symbolic manipulation directly in my matlab code.
4 件のコメント
Sean de Wolski
2014 年 2 月 20 日
Dinant, I answered your question and provided you with code that does exactly what you asked for. If it's not, please clarify in your comments what you actually want.
Dinant Kistemaker
2019 年 2 月 19 日
Thanks for the help, but you did not. I have reinitiated my post in hope I can get a workaround for this...
回答 (6 件)
Dinant
2013 年 11 月 4 日
7 件のコメント
Sean de Wolski
2013 年 11 月 4 日
What release are you using? Because on mine(R2013b) it creates a 1x2 sym
Code:
fi = sym([1 2])
size(fi)
sin(fi(1))
Printed:
fi =
[ 1, 2]
ans =
1 2
ans =
sin(1)
Dinant Kistemaker
2019 年 2 月 19 日
I am still very much looking forward to an answer to my question. It is really annyoing that the printed format is not in vector notation. I want to use the output for some symbolic manipulations in my code and I want to use vector notation.
if I type:
fi = sym ('fi',[1 3]);
x=cos(fi)
>>x =
[ cos(fi1), cos(fi2), cos(fi3)]
I would very much want to have the answer in vector notation like:
x =
[ cos(fi(1)), cos(fi(2)), cos(fi(3))]
0 件のコメント
Dinant Kistemaker
2020 年 2 月 26 日
I am so looking forward to an answer to my problem...
Somebody from the Mathworks?
1 件のコメント
Steven Lord
2020 年 2 月 26 日
If you want an official MathWorks answer please contact Technical Support directly using the telephone icon in the upper-right corner of this page.
I suspect you will not be able to do what you want with sym or syms. Depending on what "use outcome of symbolic manipulation directly in my matlab[sic] code" means the matlabFunction function may be of use.
参考
カテゴリ
Help Center および File Exchange で Assumptions についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!