how can I use syms with spdiags function?
1 view (last 30 days)
Show older comments
hi how can I fix the following error ? % The following error occurred converting from sym to double: Error using symengine (line 58) DOUBLE cannot convert the input expression into a double array. If the input expression contains a symbolic variable, use VPA. % here's my code : U = sym('u', [20 1]); w=zeros(20,20); w = sym('w', [20 20]); % w = diag(1./sqrt(U)); w = spdiags(1./sqrt(U),0, 20,20); %% I want to have a matrix w of size 20*20 with the diagonals of u1,u2,...u20. thanks alot
0 Comments
Answers (0)
See Also
Categories
Find more on Linear Algebra 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!