Borrar filtros
Borrar filtros

I need to save previous adjacent position of object movement

1 visualización (últimos 30 días)
DAT VUONG
DAT VUONG el 5 de Ag. de 2021
Comentada: Chunru el 8 de Ag. de 2021
hello everyone!
I have faced the problem is that i need to save previous adjacent position of object in order to identify the difference of object. Here is my code and i need to save the previous adjacent value of Rx. thanks
%%% Move Rx around the room according to Position vector above %%%%
%%% and measure the received power at Rx %%%%%%%%%%
for xx=1:1:no_of_moves_in_x
for yy=1:1:no_of_moves_in_y
Rx = get_Rx_position(Rx_pos_x(xx), Rx_pos_y(yy));
end
end

Respuestas (1)

Chunru
Chunru el 5 de Ag. de 2021
RxPre = [0 0]; % initial position
for xx=1:1:no_of_moves_in_x
for yy=1:1:no_of_moves_in_y
Rx = get_Rx_position(Rx_pos_x(xx), Rx_pos_y(yy));
% Do comparison of Rx and RxPre here
RxPre = Rx;
end
end
  2 comentarios
DAT VUONG
DAT VUONG el 8 de Ag. de 2021
Thanks for your comment, however, i want to save just only the previously adjacent value of Rx.
Chunru
Chunru el 8 de Ag. de 2021
You only have a previous and current value.

Iniciar sesión para comentar.

Categorías

Más información sobre Graphics Object Properties en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by