I would like to plot the following inequalities:
y < p2(1 - p1) and x < p1(1 - ( y / (1 - p1))).
Given that the first is satisfied, I want to plot the region in which both are satisfied.
p1 and p2 can vary within [0,1].
我将不胜感激任何帮助!
试试这个:红色区域是满足两个不等式的地方。
[X,Y]=meshgrid(0:0.01:1,0:0.01:1); % Make a grid of points between 0 and 1
p1=0.1; p2=0.2; % Choose some parameters
ineq1 = Y<p2*(1-p1);
ineq2 = X<p1*(1-(Y./(1-p1)));
colors = zeros(size(X))+ineq1+ineq2;
scatter(X(:),Y(:),3,colors(:),'filled')
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)