Error using symengine, Too many input arguments

i hvae this code
f=@(MV,red_P) red_P - 8*redT/(8*MV-1) +27/(64*MV^2);
dp_dMV=diff(sym (f));
dp_dMV=matlabFunction(dp_dMV);
when I run it , it shows me this
Error using symengine>@()1.0
Too many input arguments.
but my friend have the same code with different names and it is working
this is her
f=@(phi,P_r) P_r - 8*Tr/(8*phi-1) +27/(64*phi^2);
dp_dphi=diff(sym(f));
dp_dphi=matlabFunction(dp_dphi);

댓글 수: 4

madhan ravi
madhan ravi 2018년 11월 14일
provide the datas needed to run your code
how ?
madhan ravi
madhan ravi 2018년 11월 14일
does the variables have any values?
ooh sorry
this is it
MV=0.15:0.02:1.75; %create Molar Volume array
redT=0.85:0.05:1; %create Temperature array

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

답변 (1개)

madhan ravi
madhan ravi 2018년 11월 14일

0 개 추천

syms Tr P_r P_r phi
f=@(phi,P_r) P_r - 8*Tr/(8*phi-1) +27/(64*phi^2);
dp_dphi=diff(sym(f));
dp_dphi=matlabFunction(dp_dphi);

댓글 수: 3

it shows me this error
The following error occurred converting from sym to double:
Unable to convert expression into double array.
madhan ravi
madhan ravi 2018년 11월 14일
편집: madhan ravi 2018년 11월 14일
try clear all at the very begining if your code
yes I have

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

태그

질문:

2018년 11월 14일

댓글:

2018년 11월 14일

Community Treasure Hunt

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

Start Hunting!

Translated by