Filter löschen
Filter löschen

I need to save previous adjacent position of object movement

1 Ansicht (letzte 30 Tage)
DAT VUONG
DAT VUONG am 5 Aug. 2021
Kommentiert: Chunru am 8 Aug. 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

Antworten (1)

Chunru
Chunru am 5 Aug. 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 Kommentare
DAT VUONG
DAT VUONG am 8 Aug. 2021
Thanks for your comment, however, i want to save just only the previously adjacent value of Rx.
Chunru
Chunru am 8 Aug. 2021
You only have a previous and current value.

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Graphics Object Properties finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by