patch function, how to patch values accordingly

3 visualizaciones (últimos 30 días)
ng jun Quan
ng jun Quan el 28 de Abr. de 2019
Editada: Walter Roberson el 28 de Abr. de 2019
redhr = [2 3];
blueb = [1];
greenmin = [5]
these are value that i want to patch
how do i patch these value according to the figure below
  3 comentarios
ng jun Quan
ng jun Quan el 28 de Abr. de 2019
i don't really know how to use the patch function
Walter Roberson
Walter Roberson el 28 de Abr. de 2019
Editada: Walter Roberson el 28 de Abr. de 2019
I recommend that you use the Faces and Vertices inputs.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 28 de Abr. de 2019
Editada: Walter Roberson el 28 de Abr. de 2019
vert = [
0 0
3 0
8 0
0 3
2 3
3 3
2 4
3 4
0 5
2 5
3 5
8 5
];
face = [
1 2 6 4
2 3 12 11
4 5 10 9
5 6 8 7
7 8 11 10
];
cmap = [
1 0 0
0 1 0
1 0 0
0 0 1
0 0 1
];
patch('Vertices', vert, 'Faces', face, 'FaceVertexCData', cmap, 'facecolor', 'flat');

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by