Graph function problem Incorrect values

조회 수: 2 (최근 30일)
Emilia
Emilia 2022년 7월 28일
댓글: Emilia 2022년 7월 28일
Hello,
I have this function, If I want to produce a graph in the range of 0<x<50 it does not give a correct answer of y. Thanks for the helpers
x=1
y=-x.^3+3*x.^2+2*x-27
y =
-23
%%plot
x=[0:50];
y=-x.^3+3*x.^2+2*x-27;
plot(x,y)

채택된 답변

Chunru
Chunru 2022년 7월 28일
What's wrong?
x=[0:50];
y=-x.^3+3*x.^2+2*x-27;
plot(x,y)
  댓글 수: 3
Chunru
Chunru 2022년 7월 28일
The y axis scale is x10^4. If you zoom in, you will see the correct value.
Emilia
Emilia 2022년 7월 28일
Yes, you're right, I didn't notice. Thank you! :)

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

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