필터 지우기
필터 지우기

code works in input but not when in a script

조회 수: 1 (최근 30일)
robert perry
robert perry 2013년 12월 13일
답변: Walter Roberson 2013년 12월 13일
i have a section of coding that works fine when i type it in directly but reports errors and never finishes running when in a script. the section in the script is
c=Z(1,c2);
syms x
sl1 = solve (cosh(x/(2*c)-(3*c)^2+5)==x);
SOL(1,c2)= sl1 ;
c2=c2+1;
it reports a problem with the line 'd = solve...' and errors within the solve command. i cant figure out whats wrong with it as when i type it in the main matlab command line it works fine. the exact errors are
In mupadengine/feval (line 150)
[S,err] = evalin(engine,stmt);
In solve (line 170)
sol = eng.feval('symobj::solvefull',eqns,vars);
In Untitled (line 9)
d = solve (tanh(x/(2*b))==x);
completely stumped so any help would be brilliant,thanks

답변 (1개)

Walter Roberson
Walter Roberson 2013년 12월 13일
Do not have a space between "solve" and the "(".

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by