If Statement not using conditionals
Show older comments
Hi, I wanted to know if anyone knew why my if/else statement was not producing the specified outputs with my current code:
v= (0:5:50)
if 49.9<v<51.1
a_n = .01
else
a_n=(-0.01.*(v-50))./((exp(-(v-50)./10))-1)
end
b_n= exp((v+60)./80)./8
the output of a_n should only be .01 at v=50, yet .01 is the only output and is completely ignoring the else aspect of the statement. Does anyone know why this is, and if so, could you tell me why this is occuring?
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!