i am trying to make a function that make graphs by giving different value

조회 수: 2(최근 30일)
function D=po(a,b,c,x1,x2)
x=(x1:0.1:x2);
for j=1:length(x)
M(j)=a*x(j)^2+b*x(j)+c;
end
figure(1)
fplot(@(x) M(j))
grid on
function D=O(a,b,c,x1,x2)
D=arrayfun(@po,a,b,c,x1,x2 );
end
end
  댓글 수: 1
Ive J
Ive J 2022년 1월 13일
Hmmmm, maybe start with a better and more clear question...

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

답변(1개)

Shivam Singh
Shivam Singh 2022년 2월 4일
Hello,
To be familiar with how to write MATLAB code, you may start with the MATLAB Onramp tutorial to quickly learn the essentials of MATLAB. You may also refer the “Nested Functionsto write your MATLAB code.

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by