Could any body check my work? (Plot the function)

x = [-56:64];
y = [3.*x^2-5.*x-6];
plot(x,y,'--r','LineWidth',0.5)
xlabel('e')
ylabel('n')
title('kg')
Is this the proper answer for the question? Is there anything I should change for it to become the correct answer?
Question assignment.jpg

 채택된 답변

madhan ravi
madhan ravi 2019년 8월 24일

0 개 추천

Your x and y doesn’t need square brackets. Check your title once again.

댓글 수: 9

So should this be the answer i should give?
x = -56:64;
y = 3.*x^2-5.*x-6;
plot(x,y,'--y','LineWidth',0.5)
xlabel('e')
ylabel('n')
title('kg')
Seems about right, but the title part is confusing , "your weight in kg" , are you calculating any weight?
John wick
John wick 2019년 8월 24일
편집: John wick 2019년 8월 24일
No I need to create a title for the plot, It's a question I learn, we are not calculating any weight
madhan ravi
madhan ravi 2019년 8월 24일
편집: madhan ravi 2019년 8월 24일
John wick
John wick 2019년 8월 24일
What do u mean? which latter code? Could you give me some example?
x = -56:64;
y = 3*x.^2-5*x-6;
plot(x,y,'--y','LineWidth',0.5)
xlabel('e')
ylabel('n')
title('kg')
John wick
John wick 2019년 8월 24일
So I shouldn't use 3.*x Can you explain why it should be that format? why not 3.*x is there any difference?
https://in.mathworks.com/matlabcentral/answers/477409-could-any-body-check-my-work-plot-the-function#comment_738540 - probably reading that link in the comment should help you understand basically you’re still stuck in the fundamentals of MATLAB.
John wick
John wick 2019년 8월 24일
I still need to improve more, I will read and try to understand it from the link you gave me. Thank you so much for helping me all this times!

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

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Control System Toolbox에 대해 자세히 알아보기

태그

질문:

2019년 8월 24일

댓글:

2019년 8월 24일

Community Treasure Hunt

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

Start Hunting!

Translated by