# I can Not include my condition

1 view (last 30 days)
Hamid on 8 Dec 2014
Commented: Hamid on 8 Dec 2014
Hi everybody,
I want to put a condition in my code, This is the code:
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);
and this is that I want to put as a condition,
(Le(i)/Ep(i,6))>200
##### 2 CommentsShow 1 older commentHide 1 older comment
Hamid on 8 Dec 2014
Edited: Hamid on 8 Dec 2014
Thank you Zoltán Csáti
I don't know how to do this because I want Ex,Ey,Ez obtain base on
(Le(i)/Ep(i,6))>200

Thorsten on 8 Dec 2014
if Le(i)/Ep(i,6) > 200
% do something
end
Hamid on 8 Dec 2014

### Categories

Find more on Programming Utilities in Help Center and File Exchange

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!