Invalid use of operator
조회 수: 8 (최근 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!