Two conditional operations can be used in matlab or do I need to use double if?
Show older comments
for i = 1:length(beam_spalling.high)
if transversal(i) == 0 && ongitudinal == 0
severity_bs(i) = 2;
elseif transversal(i) == 0 && longitudinal > 0
severity_bs(i) = 3;
elseif transversal(i) > 0 && longitudinal == 0
severity_bs(i) = 3;
else transversal(i) > 0 && longitudinal > 0
severity_bs(i) = 4;
end
end
For the third conditional, could be used another loop to have one or another option?
2 Comments
Yongjian Feng
on 26 Jul 2021
For the third one, you meant this:
elseif transversal(i) > 0 && longitudinal == 0
It looks good. What do you want please?
DulceEien
on 27 Jul 2021
Accepted Answer
More Answers (0)
Categories
Find more on Signal Processing Toolbox 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!