If...elseif Statement Not Pulling Variables
Show older comments
Please I need help. I am trying to run the following arguments for three different cases using the if..elseif statement but it is popping up errors. I am trying to pull the values for the variables a, b and c for a subsequent calculation, depending on what statement is true from the three cases below.
if (E<0.01) and (F<L1) or (E>0.01) and (F<L2)
then
a = 0.98; b = 0.4846; c = 0.0868;
elseif (0.01<E<0.4) and (L3<F<L1) or (E>0.4) and (L3<F<L4)
then
a = 0.845; b = 0.5351; c = 0.0173;
elseif (E<0.4) and (F>L1) or (E>0.4) and (F>L4)
then
a = 1.065; b = 0.5824; c = 0.0609;
end
Thank you
1 Comment
Jan
on 6 Apr 2015
I've formatted your code, do improve the readability. Please apply a proper code formatting by your own - thanks!
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing 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!