フィルターのクリア

??? 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 Center および File ExchangeAssembly についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by