I am given set of five linear inequalities how to plot the graph showing the common area
이 질문을 팔로우합니다.
- 팔로우하는 게시물 피드에서 업데이트를 확인할 수 있습니다.
- 정보 수신 기본 설정에 따라 이메일을 받을 수 있습니다.
오류 발생
페이지가 변경되었기 때문에 동작을 완료할 수 없습니다. 업데이트된 상태를 보려면 페이지를 다시 불러오십시오.
이전 댓글 표시

How can I draw 2D plot for these set of linear inequalities with ki representing x-axis and kd representing y-axis.The common area that is a convex polygon formed by these inequalities must be seen in the plot.The polygon should be in a way represented by picture below.

채택된 답변
You can use lcon2vert,
to obtain the vertices V of the region. Then use plot(polyshape(V)).
A=[1,0;
1,-0.2699;
1,-0.3666;
-1,+3.5358
1,-13.5777];
b=[0,-4.6836,-10.0797,-3.912,140.2055].';
V=lcon2vert(A,b);
plot(polyshape(V))

댓글 수: 13
I am getting this error please help me 

That's because you didn't download lcon2vert from the link I gave you.
Thank you got the plot
how to do a 3d plot?
Laxmi Akshaya Thela's asnwer moved here

Can u please help me to get 3D plot for these equations with kp,ki,kd as the 3 axis .
While trying to plot for the above set of equations I was getting he below error.
Error using lcon2vert>con2vert (line 326)
Non-bounding constraints detected. (Consider box constraints on variables.)
Error in lcon2vert (line 254)
Zt=con2vert(AAA,bbb,TOL,checkbounds);
For the above equations the plot should be as in the pic below :

Please help me out with this I have got to submit an assignment.
I need to see your code (as text, not as an imge).
A=[1,0;1,-1;1,-15];
>> b=[0,-1,-55];
>> V=lcon2vert(A,b);
Error using lcon2vert>con2vert (line 326)
Non-bounding constraints detected. (Consider box constraints on variables.)
Error in lcon2vert (line 254)
Zt=con2vert(AAA,bbb,TOL,checkbounds);
This is the code that I used..The same one which you have sent.The code that you have sent is working fine for the set of equations that I have given two days back.But dont know why for the present set of equations it is showing an error.
I am getting the 2D plot there is no issue with that I gave the signs wrong so it was showing an error.
Just help me about the how to get the 3D as obtained in the below pictures.I am required to get multiple Triangles on the 3D plot.The first plot represents the solution to below code
A=[1,0;-1,1;1,-15];
b=[0,1,55];
V=lcon2vert(A,b);
plot(polyshape(V))
By using the above code I am able to get it on 2D plot.
I want to know how to get it on 3D plot as shown in fig below?

You can use the patch() command to plot 3D polygons,
Thank you patch() command is working.
I have got one more doubt.
A=[1,0;-1,0.3577;1,-1.2241;-1,11.418];
b=[0,-0.4921,1.6767,98.493];
V=lcon2vert(A,b);
plot(polyshape(V));
xlabel('Ki');
ylabel('kd');
For the above code I am getting the below error :
Error using polyshape/getXY (line 672)
x- and y-coordinate matrix must have 2 columns with at least 3 rows.
Error in polyshape/checkInput (line 842)
[X, Y, xy2input, next_arg] = polyshape.getXY(varargin{:});
Error in polyshape (line 169)
[X, Y, tc, simpl, collinear] = polyshape.checkInput(param, varargin{:});
Error in polygon (line 4)
plot(polyshape(V));
Please help me resolve this error .What should I be doing about this error?
Your polygon is empty
>> A=[1,0;-1,0.3577;1,-1.2241;-1,11.418];
b=[0,-0.4921,1.6767,98.493];
V=lcon2vert(A,b)
V =
[]
How to apply grids for a 3d plot, my 3d plot is not very clear because of the small values.So,I want to apply grid to my plot.Please help me out with this issue.

추가 답변 (1개)
There is also this File Exchange submission,
It does not require the vertices to be precomputed, and works for either 2D or 3D.
카테고리
도움말 센터 및 File Exchange에서 Polygons에 대해 자세히 알아보기
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
