I am trying to plot x and y with y being the only unknown but I don’t what is wrong in my code please help
2 ビュー (過去 30 日間)
古いコメントを表示
1 件のコメント
採用された回答
Mischa Kim
2021 年 1 月 11 日
Honore,
the one thing I notice is that x and y are vectors. Rewrite the y-equation using the dot operator, .^ instead of just ^:
y = ..cos(theta)^2)*x.^2;
In general, please share in your questions code rather than a screen shot of the code.
0 件のコメント
その他の回答 (1 件)
KSSV
2021 年 1 月 11 日
- Your x is an array
- Where as theta is only a scalar.
- You have to make theta and x both arrays of same size.
- You need to use element by element operations.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!