How I can plot this equation ((1-e^-a)^m)
显示 更早的评论
采纳的回答
更多回答(2 个)
First you need to decide if you want a surface plot, with two independent variables, or a line plot, with one independent variable. If you want a line plot, then you must decide whether the variable for the horizontal axis is a or m.
Example 1: Assume a=1 and let m=0:.1:10.
Example 2: Assume m=1 and let a=0:.1:10.
a=1;
m=0:.1:10;
z=(1-exp(-a)).^m;
subplot(211), plot(m,z,'-r.');
xlabel('m'); ylabel('z'); title('z=(1-exp(-a))^m, a=1');
m=1;
a=0:.1:10;
z=(1-exp(-a)).^m;
subplot(212), plot(a,z,'-r.');
xlabel('a'); ylabel('z'); title('z=(1-exp(-a))^m, m=1')
Try it.
3 个评论
Example 3: Surface plot. a=0:.5:10. m=0:.5:10.
a=0:.5:10;
m=0:.5:10;
z=repmat((1-exp(-a)),21,1).^repmat(m',1,21);
surf(a,m,z);
xlabel('a'); ylabel('m'); zlabel('z');
title('z=(1-exp(-a))^m');
Try it. Good luck.
Ao Mohamed
2022-5-29
Ao Mohamed
2022-5-29
类别
在 帮助中心 和 File Exchange 中查找有关 Annotations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




