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