필터 지우기
필터 지우기

How to convert from a function of frames to a function of time for radar board (Infineon Position2Go)?

조회 수: 5 (최근 30일)
Hi Matlab Community,
I am currently using Infineon's Position2Go FMCW radar board for my project to measure instantaneous sprinting speed and walking speed. After extracting the raw data to Matlab, I noticed that the graphs I have are all as a function of Frames on the X axis. How can I convert them to a function of time (in seconds) instead?
My configs are as follows:
  • 32 Chirps Per Frame
  • 64 Samples Per Chirp
  • 150ms Frame Interval
Does it mean that for every second, there are 6.66 Frames(1/150ms) ?

답변 (1개)

Anshuman
Anshuman 2024년 7월 15일 11:16
Yes, you are correct. Given that the frame interval is 150 ms, it means that there are approximately 6.66 frames per second. To convert the X-axis from frames to time (in seconds), you can use this relationship.
Here's how you can do it in MATLAB:
% Assuming frames is the number of frames you have
frames = 1:N; % Replace N with the actual number of frames
frame_interval = 0.150; % Frame interval in seconds
% Create the time vector
time = (frames - 1) * frame_interval;
% Assuming data is the variable that contains your measurements
% Replace 'data' with your actual data variable
figure;
plot(time, data);
xlabel('Time (seconds)');
ylabel('Measurement');
title('Measurement vs Time');
% If you have multiple data sets, you can plot them similarly
% For example, if you have multiple measurements stored in a matrix
% where each row corresponds to a different measurement:
figure;
hold on;
for i = 1:size(data, 1)
plot(time, data(i, :));
end
xlabel('Time (seconds)');
ylabel('Measurement');
title('Measurement vs Time');
legend('Measurement 1', 'Measurement 2', 'Measurement 3', ...); % Add appropriate legends
hold off;

카테고리

Help CenterFile Exchange에서 MATLAB에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by