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!