How to type sin function with square
古いコメントを表示
I'm working with O.D.E in matlan and I found that I cannot type sin square x. Is there any particular syntax for that or is there any other way?
採用された回答
その他の回答 (1 件)
While the usual mathematical notation to compute the square of the sine of x is
, the MATLAB code to perform that computation is sin(x)^2 (or, since you likely want to compute the square of the sine element-wise, sin(x).^2).
x = 0:pi/4:2*pi
sin(x).^2
You cannot put the squaring operator between the name of the function (sin) and its input argument x.
カテゴリ
ヘルプ センター および File Exchange で Mathematics についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


