How to plot for different parameter values of a, p1 and p2
Afficher commentaires plus anciens
Hi all, I want to plot using different parameter values of a, p1 and p2 in the same plot in the following code. Like a = 1,2,3 , p1= 1,2,3 and p2= 1,2,3.
My code:
a = 1;
p1=1;
p2=1;
r1 = 1/2.*log2(1+(p1/(a+ p2)));
r2 = 1/2.*log2(1+(p2/(a)));
plot([0 r1],[r2 r2]);
hold on;
plot([r1 r2],[r2 r1]);
plot([r2 r2],[r1 0]);
Thanks
2 commentaires
TastyPastry
le 20 Oct 2015
Can you be more specific as to what you're trying to plot on each axis? Currently your code plots 3 lines on the same plot. Are you trying to shorten your code?
vetri veeran
le 21 Oct 2015
Modifié(e) : vetri veeran
le 21 Oct 2015
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Matrix Indexing 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!
