How to plot for different parameter values of a, p1 and p2
Show older comments
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 Comments
TastyPastry
on 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
on 21 Oct 2015
Edited: vetri veeran
on 21 Oct 2015
Accepted Answer
More Answers (0)
Categories
Find more on Matrix Indexing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!