Info
Cette question est clôturée. Rouvrir pour modifier ou répondre.
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 vue (au cours des 30 derniers jours)
Afficher commentaires plus anciens
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170660/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/170661/image.png)
1 commentaire
Stephen23
le 20 Fév 2018
Modifié(e) : Stephen23
le 20 Fév 2018
"...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!
Réponses (1)
Amjad Green
le 21 Fév 2018
phi=(n1-n2)/R... you should remove the semi column to see phi in workspace
0 commentaires
Cette question est clôturée.
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!