分数関数の使い方が知りたいです.
7 views (last 30 days)
Show older comments
matlabで,y = 1 / (3x^2 + 2x + 4) のような分数関数を入力し,さらにそれをグラフに表す方法を教えてください.
xの範囲をlinspaceで指定して,とりあえずy = 1 / (3*x^2 + ...)と入力してみましたが,案の定できなかったため質問しました.
よろしくお願いします.
0 Comments
Accepted Answer
Takumi
on 2 Jun 2020
行列の乗算ではなく要素単位の乗算を実行するには、.* 演算子を使用します。割り算、べき乗も同じです。
x = linspace(-2,2,100);
y = 1 ./ (3*x.^2 + 2*x + 4);
plot(x,y);
More Answers (0)
See Also
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!