Invalid use of operator
14 ビュー (過去 30 日間)
古いコメントを表示
I try to make the graph of this equation:
I(a) = a^6 * (K1 *K3 - K2^2)
where
a = [0,5,100]
K1 = besselk(1,a)
K3 = besselk(3,a)
K2 = besselk(2,a)
my code is
I = (a.^6)*(K1.*K3.-K22.)
and I get "invalide use of operator" for (-) symbol. I can not understand why. Can please anyone help?
0 件のコメント
回答 (1 件)
Fangjun Jiang
2021 年 9 月 24 日
There is a difference between operator "*" and ".*". But there is no such an operator as ".-" in MATLAB.
3 件のコメント
Walter Roberson
2021 年 9 月 24 日
a = [0,5,100]
K1 = besselk(1,a)
K3 = besselk(3,a)
K2 = besselk(2,a)
I = (a.^6) .* (K1 .* K3 - K2.^2)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!