필터 지우기
필터 지우기

how to make a patch using normal vector?

조회 수: 2 (최근 30일)
Sierra
Sierra 2022년 5월 28일
답변: Ishu 2023년 10월 30일
I made patch and connect them. so I could make a someting like a tube.
but the result(first image) is not what i intended to make.
I want to have a patch like a second image using normal vector.
let me know how to make a patch using normval vector.
thanks!

답변 (1개)

Ishu
Ishu 2023년 10월 30일
Hi Sierra,
I understand that you want to plot a patch over some already plotted graphs means you want to overlay a patch.
To plot a patch using a normal vector you can use "patch()" function. As you have not provided the data so I will not be able to plot your graph but a general example of the implementaion of "patch()" is show below.
x = [1, 2, 1, 3, 1, 4, 1, 5, 1, 6, 1, 7, 1, 8, 1, 9, 1, 10];
y = [1, 4, 1, 2, 1, 8, 1, 5, 1, 3, 1, 9, 1, 7, 1, 6, 1, 10];
% Plot lines
plot(x, y);
x_patch = [1, 6, 6.5, 1];
y_patch = [1, 4, 9, 1];
% plot patch
patch( x_patch, y_patch, 'k', 'Facecolor', 'none');
xlabel('X');
ylabel('Y');
You can change the data according to your needs and can plot a patch as you want.
For more information of "patch()" function you can refer to the below documentaion:
Hope if helps.

카테고리

Help CenterFile Exchange에서 Polygons에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by