필터 지우기
필터 지우기

??? Undefined function or method 'dsip' for input arguments of type 'double'.

조회 수: 1 (최근 30일)
Abdulaziz
Abdulaziz 2012년 4월 9일
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

답변 (2개)

Sean de Wolski
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.

Wayne King
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);
  댓글 수: 1
Abdulaziz
Abdulaziz 2012년 4월 9일
thank you I made mistake in printing disp.
But x(n) and x(k) has a values and I want to keep x as a variable.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Assembly에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by