code works in input but not when in a script
Mostra commenti meno recenti
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 Commento
Azzi Abdelmalek
il 13 Dic 2013
What is Z?
Risposte (1)
Walter Roberson
il 13 Dic 2013
0 voti
Do not have a space between "solve" and the "(".
Categorie
Scopri di più su Numeric Solvers in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!