필터 지우기
필터 지우기

I need to save previous adjacent position of object movement

조회 수: 1 (최근 30일)
DAT VUONG
DAT VUONG 2021년 8월 5일
댓글: Chunru 2021년 8월 8일
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

답변 (1개)

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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Graphics Object Properties에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by