how can I use syms with spdiags function?
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
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 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Linear Algebra finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!