Hi i have an image lets say 400x600 and i plot the green rectangle with x1=101,y1=101 and widthGreen=200,heigthGreen=200.
Then i want to display the blue rectangle IN the green also with x2=101,y2=101 and widthBlue=50,heigthBlue=50.
The problem is that the green square has as reference system the original image the samedoes the blue.
But i want the blue square have as reference system the green square.
The right position of the blue square lets say is down to the right.
Any suggestions on how to do this?

 Respuesta aceptada

KSSV
KSSV el 20 de Feb. de 2019
Editada: KSSV el 20 de Feb. de 2019

0 votos

x2 = x1+width ;
y2 = y1+height ;

4 comentarios

pasta pontikaki
pasta pontikaki el 20 de Feb. de 2019
sorry what is x1,y,1. In which rectangle are you referenced..
KSSV
KSSV el 20 de Feb. de 2019
Edited.....
pasta pontikaki
pasta pontikaki el 20 de Feb. de 2019
Din't work exactly but i change it a bit and it worked, thank you very much
ssss.PNG
KSSV
KSSV el 20 de Feb. de 2019
Editada: KSSV el 20 de Feb. de 2019
May be you have to intechange widht and height.....
x2 = x1+height ;
y2 = y1+width ;

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Labels and Annotations en Centro de ayuda y File Exchange.

Preguntada:

el 20 de Feb. de 2019

Editada:

el 20 de Feb. de 2019

Community Treasure Hunt

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

Start Hunting!

Translated by