creating a rectangle plot
Mostrar comentarios más antiguos
How can i create this rectangle in matlab?
Respuestas (3)
p = [0 2 2 3 3 5 5 0 0;
0 0 1 1 0 0 4 4 0];
plot(p(1,:), p(2,:))
6 comentarios
PA
el 25 de Jul. de 2022
Chunru
el 25 de Jul. de 2022
You can use polygon but not rectangle since it is NOT a rectangle.
PA
el 25 de Jul. de 2022
Walter Roberson
el 25 de Jul. de 2022
top row of p is x coordinates. Bottom row is y coordinates.
PA
el 26 de Jul. de 2022
You can work out the coordinates (use nan to break up the line).
p = [0 4 nan 6 7 7 0 0 nan 4 6 6 4 4;
0 0 nan 0 0 5 5 0 nan -1 -1 1 1 -1];
plot(p(1,:), p(2,:)); axis off
4 comentarios
Walter Roberson
el 29 de Jul. de 2022
it is not clear what information is given? or is it an image that is given?
PA
el 29 de Jul. de 2022
PA
el 29 de Jul. de 2022
Walter Roberson
el 29 de Jul. de 2022
please post a sample image that does not have the annotations
PA
el 29 de Jul. de 2022
0 votos
1 comentario
Walter Roberson
el 29 de Jul. de 2022
Please post an actual image, not a diagram
Categorías
Más información sobre Image Arithmetic en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

