필터 지우기
필터 지우기

how can I use syms with spdiags function?

조회 수: 1 (최근 30일)
fahim GH
fahim GH 2016년 11월 3일
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개)

카테고리

Help CenterFile Exchange에서 Numbers and Precision에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by