What is wrong with this code?
情報
この質問は閉じられています。 編集または回答するには再度開いてください。
古いコメントを表示

I am new to Matlab, which is probably very apparent from the above picture. I am trying to display that the left side of the equation on line 4 is equal to the function on the right after the n and x have been defined by the user. Any help would be much appreciated. Thanks!
0 件のコメント
回答 (2 件)
madhan ravi
2019 年 2 月 18 日
編集済み: madhan ravi
2019 年 2 月 18 日
Remove the single quotes from the last line, upload the code instead of a picture.
a/rw^2 == (cos(x)+(n^2*cos(2*x)+sin(x)^4))/((n^2-sin(x)^2)^(3/2))
% ^-^---------^-^------^-^^^------------^-^-- see the changes
Note: You should define rw as a number like x and n.
0 件のコメント
'a/rw^2'==
The above is completely wrong........variable shoould be simply:
a = your expression
There are lot of typos...you need to use something like below:
a = (cos(x)+(n^2*cos(2*x)+sin(x)^4))/((n^2-sin(x)^2)^(3/2))
0 件のコメント
この質問は閉じられています。
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!