Info

이 질문은 마감되었습니다. 편집하거나 답변을 올리려면 질문을 다시 여십시오.

Graphing using Matlab. How would you graph a function using matlab?

조회 수: 1 (최근 30일)
Khang Nguyen
Khang Nguyen 2020년 11월 23일
마감: MATLAB Answer Bot 2021년 8월 20일
I am wondering how can you graph a function in MatLab? This is how I do it but the code doesn't work
% for matrix A
a = 24;
b = 4.8;
c = - 0.5 ;
d =0.43
%y= a+bx
hold on
for i = 0:20
y = a + b*i
plot(i,y)
end
% now y = a + b*x + c*x^2
% and y = a + b*x +c*x^2 +d*x^3
% how would you graph these function?

답변 (1개)

Stephan
Stephan 2020년 11월 23일
a = 24;
b = 4.8;
ii = 0:20;
y = a + b.*ii;
plot(ii,y)

이 질문은 마감되었습니다.

태그

Community Treasure Hunt

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

Start Hunting!

Translated by