i am trying to make a function that make graphs by giving different value
1 次查看(过去 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 个)
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 Functions” to write your MATLAB code.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Construction 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!