フィルターのクリア

the error here in equalization an ordinary variable in symbolic the error in E and says:" Conversion to double from sym is not possible." wt can ii do???

3 ビュー (過去 30 日間)
syms x;
syms y;
rt=[x y];
xloc=[1 2 4 5];
yloc=[23 45 67 44];
N=4;
noOfratios=6;
E=[ones(1,1),ones(1,1)]
%s=5*ones(1,length(N));
for i=1:N
di=rt-[xloc(i),yloc(i)]
E(i,1)=1./(abs(di).^2);
end
for i = 1:noOfratios
j = setdiff(1:noOfratios,i);
k(i,j)=E(i)/E(j);
end
for i = 1:noOfratios
j = setdiff(1:noOfratios,i);
c(i,j)=r(i,2)-k(i,j).*r(j,2);
di=[xloc(i)-xloc(j),yloc(i)-yloc(j)]
p(i,j)=(k(i,j).*(abs(di)))./(1-k(i,j).^2)
end

回答 (1 件)

Walter Roberson
Walter Roberson 2011 年 4 月 4 日
Umm, exactly which line does it say it on?
And where did you get the idea that the single symbolic variable "r", which is never assigned a value, could be indexed at (i,2) and (j,2) at the Matlab level?
  3 件のコメント
Walter Roberson
Walter Roberson 2011 年 4 月 4 日
Is there a point in doing the abs() before doing the .^2 ? Are you expecting imaginary values or only real values?
SAM alimostafa
SAM alimostafa 2011 年 4 月 4 日
no points i want to ignore negative values and only real values is expecting

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeAssumptions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by