??? Undefined function or method 'dsip' for input arguments of type 'double'.
조회 수: 1 (최근 30일)
이전 댓글 표시
Hi guys, When i try to run this code i get an error says: ??? Undefined function or method 'dsip' for input arguments of type 'double'.
syms x x1 x2 x3 x4 x5 x6 x7
i=1;
for j=0:2/6:2
x(i)=j;
i=i+1;
end
for k=1:1:7
l(k)=1;
for n=1:1:7
if n~=k;
l(k)=l(k)*((x-x(n))/(x(k)-x(n)));
end
dsip(l(k));
end
and if i just delete the disp function I get an other error says: ??? In an assignment A(I) = B, the number of elements in B and I must be the same. end
댓글 수: 0
답변 (2개)
Sean de Wolski
2012년 4월 9일
Are you by any chance looking for disp rather than dsip?
Also, I recommend avoiding using l (lower-case L) as a variable since it looks like a 1 or an l and this can frequently cause confusion. I think this might be the source of your other error as well.
댓글 수: 0
Wayne King
2012년 4월 9일
Did you mean disp()?
For your other error:
You have
l(k)=l(k)*((x-x(n))/(x(k)-x(n)));
But x is not a scalar. You are making the following mistake
x(1) = zeros(2,1);
참고 항목
카테고리
Help Center 및 File Exchange에서 Logical에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!