フィルターのクリア

Create an m-script file to plot the following functions separately

3 ビュー (過去 30 日間)
KayLynn
KayLynn 2014 年 1 月 27 日
コメント済み: Walter Roberson 2021 年 8 月 28 日
I am trying to plot the following function in Matlab. y=x^3+2x^2-6x with x having bounds of 0 to 30 (0:30)
I am using the following code and below is the error message I am receiving x=0:30; >> plot(x,'x.^3+2x.^2-6x'),grid Error using plot Error in color/linetype argument
If someone could please help me to fix this error and/or see the error in my function I would appreciate it.

採用された回答

Azzi Abdelmalek
Azzi Abdelmalek 2014 年 1 月 27 日
編集済み: Azzi Abdelmalek 2014 年 1 月 27 日
x=0:30;
plot(x,x.^3+2*x.^2-6*x)
grid
xlabel('x')
ylabel('y')
title('y=x.^3+2*x.^2-6*x')
For more details look at
doc plot
  2 件のコメント
KayLynn
KayLynn 2014 年 1 月 27 日
Thank you. So for y=10sin(2x-3).... it would be 10*sin(2*x-3)?????
Azzi Abdelmalek
Azzi Abdelmalek 2014 年 1 月 27 日
Exact

サインインしてコメントする。

その他の回答 (1 件)

Rohit Naik
Rohit Naik 2021 年 8 月 28 日
X = [-10:10]; Y = tan^-1(X) Plot(X,Y)
  1 件のコメント
Walter Roberson
Walter Roberson 2021 年 8 月 28 日
MATLAB does not support that notation for arctangent

サインインしてコメントする。

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by