Hello newbie here. Here is the code.
syms x y
r = sqrt(x^2 + y^2);
ht = matlabFunction(r,r^2);
ht(2,2)
Here is the error
Error in symengine>@(x,y)deal(sqrt(x.^2+y.^2),x.^2+y.^2)
Error in Untitled3 (line 4)
ht(2,2)
What am i missing here?

답변 (1개)

madhan ravi
madhan ravi 2020년 6월 10일
편집: madhan ravi 2020년 6월 10일

1 개 추천

syms x y
r = sqrt(x^2 + y^2);
ht = matlabFunction([r, r^2]);
ht(2,2)

댓글 수: 2

Melih Aksoy
Melih Aksoy 2020년 6월 10일
Why do i need square brackets thought? In matlab's help center it was not without brackets. Can you explain it please?
madhan ravi
madhan ravi 2020년 6월 10일
편집: madhan ravi 2020년 6월 10일
syms x y
r = sqrt(x^2 + y^2);
ht = matlabFunction([r, r^2]);
ht(2,2) % you don't need to call it with two output arguments
ht = matlabFunction(r, r^2);
[O1, O2] = ht(2,2) % you have to call it with two output arguments

댓글을 달려면 로그인하십시오.

질문:

2020년 6월 10일

편집:

2020년 6월 10일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by