If...elseif Statement Not Pulling Variables
이전 댓글 표시
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
Jan
2015년 4월 6일
I've formatted your code, do improve the readability. Please apply a proper code formatting by your own - thanks!
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Matrix Indexing에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!