필터 지우기
필터 지우기

Plotting "live" data inside while loop?

조회 수: 4 (최근 30일)
Paul Pogba
Paul Pogba 2018년 12월 6일
답변: ahmed nebli 2018년 12월 6일
I'm capturing data in real time, with 1 second interval. When I use "disp" command, I see correct values displayed and I want to plot them. However, MATLAB only starts plotting them after I pause the script. Is there a way to plot new data every second, replacing old? Do I need to use other function than "plot"?
hold on;
while true
% 3. Trigger radar chirp and get the raw data
[mxRawData, sInfo] = oRS.oEPRadarBase.get_frame_data;
ydata = mxRawData; % get raw data
disp(real(ydata));
plot(real(ydata));
end

답변 (1개)

ahmed nebli
ahmed nebli 2018년 12월 6일
i suggest you try using the function set like in the link bellow https://www.mathworks.com/help/matlab/ref/set.html

카테고리

Help CenterFile Exchange에서 Two y-axis에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by