If loop 3 condition
Show older comments
z=zeros(1,N);
h=z;
for ii=1:N
z(ii)=(ii- 0.5)*H;
if z(ii)>L1 && z(ii)<(L1+LL)
h(ii)=z(ii)-L1;
elseif z(ii)>(L1+LL)
h(ii)=LL;
else
h(ii)=0;
end
end
3 Comments
Walter Roberson
on 1 Apr 2019
What difficulty are you encountering?
What is the code intended to do?
To test we would need values for H, L1, and LL
Shaban Akhtar
on 1 Apr 2019
Walter Roberson
on 1 Apr 2019
I still need the value for H in order to run the code.
Answers (0)
Categories
Find more on Logical 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!