필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
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

추가 답변 (1개)

Rohit Naik
Rohit Naik 2021년 8월 28일
X = [-10:10]; Y = tan^-1(X) Plot(X,Y)

카테고리

Help CenterFile Exchange에서 2-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