I can Not include my condition
Ältere Kommentare anzeigen
Hi everybody,
my code produce some elements with x,y,z coordinates.
I want to put a condition that make them to have z limit, for example from z 0-100 there are some elements and also from z 100-200 there are some elements and so on but there is no element that is in both z limit area.
any suggestion will may be helpful and Thank you for that.
for i = 1:ne
nodnum=zeros(1,nen);
for j = 1 : nen
check=Dof(:,1:nend)-ones(n,1)*Edof(i,(j-1)*nend+2:j*nend+1);
[indx,dum]=find(check==0);
nodnum(j)=indx(1);
end
%
Ex(i,:)=Coord(nodnum,1)';
if nsd>1
Ey(i,:)=Coord(nodnum,2)';
end
if nsd>2
Ez(i,:)=Coord(nodnum,3)';
end
Le(i)=sqrt((Ex(i,1)-Ex(i,2))^2+(Ey(i,1)-Ey(i,2))^2+(Ez(i,1)-Ez(i,2))^2);
end
5 Kommentare
dpb
am 9 Dez. 2014
Sorry, I can't follow what it is you've actually asking for here...can you give a small dataset that illustrates the problem and then what you want as a solution?
Hamid
am 9 Dez. 2014
Mohammad Abouali
am 9 Dez. 2014
how can that even happen? I mean how can you have both z<500 and 500<z<1000 satisfied?
Hamid
am 9 Dez. 2014
Need more precise illustration of the dataset as it's stored and what it is you're actually asking for. Give a small sample that illustrates both the full input and the desired output.
We know you understand what your explanation means but we don't have the insider's knowledge to be able to read between the lines beyond what is actually provided here.
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Downloads finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!