Info
この質問は閉じられています。 編集または回答するには再度開いてください。
Why does y come out as one number?
1 回表示 (過去 30 日間)
古いコメントを表示
I put x as a variable but y comes out as one number whats wrong?
0 件のコメント
回答 (2 件)
Roger Stafford
2018 年 3 月 29 日
編集済み: Roger Stafford
2018 年 3 月 29 日
The scalar result is caused by the use of matrix division rather than element-by-element division. Replace '/' by './'. Similarly replace '^2' by '.^2' .
2 件のコメント
Roger Stafford
2018 年 3 月 29 日
It looks as if the dot in front of the asterisk in ".^2.*1.79" is being mistaken for a decimal point after the 2. Try putting parentheses around the 2: ".^(2).*1.79"
madhan ravi
2018 年 7 月 7 日
You put x as numerical Data.
If you want to get result in terms of x then x has to be defined as a symbolic variable. i.e.,
syms x
This would give you the desired result.
0 件のコメント
この質問は閉じられています。
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!