I can Not include my condition
Mostrar comentarios más antiguos
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 comentarios
dpb
el 9 de Dic. de 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
el 9 de Dic. de 2014
Mohammad Abouali
el 9 de Dic. de 2014
how can that even happen? I mean how can you have both z<500 and 500<z<1000 satisfied?
Hamid
el 9 de Dic. de 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.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Downloads en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!