error in dimension mismatch with OrientationTerm

1 vue (au cours des 30 derniers jours)
Bekhtaoui Abdelhakim
Bekhtaoui Abdelhakim le 3 Juin 2019
Commenté : Geoff Hayes le 3 Juin 2019
hi everyone i just get a error in this line anyone can help me please
%orientation
Table=[3*pi/4 2*pi/3 pi/2 pi/3 pi/4
5*pi/6 0 0 0 pi/6
pi 0 0 0 0
-5*pi/6 0 0 0 -pi/6
-3*pi/4 -2*pi/3 -pi/2 -pi/3 -pi/4];
for ind=1:length(CentroidTermX)
Klocal=K(CentroidTermY(ind)-2:CentroidTermY(ind)+2,CentroidTermX(ind)-2:CentroidTermX(ind)+2);
Klocal(2:end-1,2:end-1)=0;
[i,j]=find(Klocal);
OrientationTerm(ind,1)=Table(i,j); !!!ERROR
end
here is the workspace results variables
  2 commentaires
Alex Mcaulley
Alex Mcaulley le 3 Juin 2019
Without more information, I guess i and j variables are arrays (not scalar values), and then you get this error trying to assign a matrix as a scalar value.
Geoff Hayes
Geoff Hayes le 3 Juin 2019
Bekhtaoui - what is the intent with these two lines of code
Klocal(2:end-1,2:end-1)=0;
[i,j]=find(Klocal);
What are you expecting i and j to be?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by