so before explaining, this is my code:
in=-8:8;
%calculate z
[a,b,k]=meshgrid(in);
%sort absolute values ascending, which allows to use unique
ac=sort(abs([a(:) b(:) k(:)]),2);
%use unique to identify duplicates
[f,g,h]=unique(ac,'rows');
%count
cnt=histc(h,1:max(h));
z=asind((1.54*sqrt((a.^2+b.^2+k.^2)./9))./2);
if z <=90;
break;
end
disp([a(g),b(g), k(g),z(g),cnt]);
so my problem was, if z<=90 those rows having <=90 should be deleted or not displayed in the output. but unfortunately, using my code it doesn't work like that please help thanks
Aucun commentaire:
Enregistrer un commentaire