I can Not include my condition
古いコメントを表示
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 件のコメント
dpb
2014 年 12 月 9 日
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
2014 年 12 月 9 日
Mohammad Abouali
2014 年 12 月 9 日
how can that even happen? I mean how can you have both z<500 and 500<z<1000 satisfied?
Hamid
2014 年 12 月 9 日
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.
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で Just for fun についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!