Info

この質問は閉じられています。 編集または回答するには再度開いてください。

I do not know why there is no answer being produced for phi when I try to run the code? (provided the question do not know if that will help)

1 回表示 (過去 30 日間)
Brennan
Brennan 2018 年 2 月 20 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
  1 件のコメント
Stephen23
Stephen23 2018 年 2 月 20 日
編集済み: Stephen23 2018 年 2 月 20 日
"...there is no answer being produced for phi when I try to run the code"
There is. phi is calculated, and then that variable is never used anywhere: you do not display it nor return it as an output argument, so once the function gets to the end phi is simply discarded. But phi is calculated, just as you coded it to do.
Do you see the wavy orange and red underscores in the editor? You should pay attention to the messages that they have for you!

回答 (1 件)

Amjad Green
Amjad Green 2018 年 2 月 21 日
phi=(n1-n2)/R... you should remove the semi column to see phi in workspace

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by