how to solve Subscripted assignment dimension mismatch.

1 vue (au cours des 30 derniers jours)
john karli
john karli le 25 Déc 2018
Modifié(e) : madhan ravi le 25 Déc 2018
i have this code for joint pmf yesturday it was working good but now i'm facing the error.
[num,text,raw] = xlsread('UFOPOLLUTANTS.xlsx');
x=num(:,10);
y=num(:,18);
X=x(1:1000);
Y=y(1:1000);
observ=x(1:1000); %
imageY=0:23;
nY = length(imageY);
observX = x(1:1000);
imageX=0:23; %Min value is 0 Max value is 172
nXx = length(imageX);
for i = 1:nXx
cX = imageX(i);
cnt(i) = sum(observX == cX);
end
pmfX = cnt/sum(cnt);
bar(imageX,pmfX)
imageY=0:23;
nY = length(imageY);
image = 0:23;
nX = length(image);
for i = 1:nX % # of occurrences for each value of image of X in the total observations of column X
cXi = image(i);
cntX(i) = sum(observX == cXi);
a=find(X==cXi) ;
p= Y(a) ;
for j = 1:nY
cX = imageY(j);
P_y(i,j) = sum(p == cX);
end
u=P_y(i,:);
d=sum(u);
if (d==0)
d=1;
end
an(i,i)=(P_y(i,:).*pmfX(i))./d;
g=xlswrite('F:\Faheem\Study\1ST MS\stochatic system\Assignment\assgn5\snapshot\anaylysis3\jointpmf1.xls',an);
end
Error
an(i,i)=(P_y(i,:).*pmfX(i))./d;
Subscripted assignment dimension mismatch

Réponse acceptée

madhan ravi
madhan ravi le 25 Déc 2018
an(i,:)
  5 commentaires
john karli
john karli le 25 Déc 2018
may you solve joint Entropy in matlab formula for joint entropy is attached
madhan ravi
madhan ravi le 25 Déc 2018
Modifié(e) : madhan ravi le 25 Déc 2018
Anytime :) , if my answer solved your question ("how to solve Subscripted assignment dimension mismatch".) make sure to accept the answer but not sure I can help with that let me try though.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Geometric Transformation and Image Registration dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by