I have trouble plotting two legends for two lines on the same plot . Here are my codes:
p = linspace(0,1,50);
v = -290*9.8*log(0.15+0.85*p);
v2 = -370*9.8*log(0.25+0.75*p);
p2 = plot(p,v2,'-b');
xlabel('PI for two options')
When I plot this, only legend option2 shows up. How should I change my codes?