How I can plot this equation ((1-e^-a)^m)
Afficher commentaires plus anciens
Selection combination outage probability
Réponse acceptée
Plus de réponses (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 commentaires
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
le 29 Mai 2022
Ao Mohamed
le 29 Mai 2022
Ao Mohamed
le 29 Mai 2022
0 votes
Catégories
En savoir plus sur Annotations dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!




