Struct contents reference from a non-struct array object.
Mostra commenti meno recenti
I want to create two matrices: x for the even values of H & y for the odd ones
H= magic(35)+ pascal (35);
oc=1; % odd column
or=1; % odd row
ec=1; %even col
er=1; %even row
for i=1:35
for j=1: 35
if mod(H(i.j),2)==1
x(er,ec)=H(i.j);
er=er+1;
ec=ec+1;
else
y(or,oc)=H(i.j);
or=or+1;
oc=oc+1;
end
j=j+1;
end
i=i+1;
end
so after trying my code, it gave me 'Struct contents reference from a non-struct array object.' ,Can anyone tell me where the problem is ?
Risposta accettata
Più risposte (0)
Categorie
Scopri di più su MATLAB in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!