If Statement not using conditionals
显示 更早的评论
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?
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Matrix Indexing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!