Why does the SOLVE command sometimes return an expression rather than a value when solving an equation or set of equations in MATLAB 7.7 (R2008b)?
Show older comments
The following set of commands when executed in MATLAB 7.7 (R2008b) throws an error.
syms f
n=1;
f1 = solve(cos((2*n+1)*pi-f)+((2*n+1)*pi-2*f)*sin(f)-cos(f));
f1=double(f1);
The error messages include:
Error using ==> sym.double at 29
DOUBLE cannot convert the input expression into a double array.
If the input expression contains a symbolic variable, use the VPA function instead.
Accepted Answer
More Answers (0)
Categories
Find more on Numeric Solvers in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!