VU- LRT simulink model

조회 수: 1 (최근 30일)
Shivanand
Shivanand 2013년 11월 14일
답변: Gautam 2025년 7월 1일
Hello guys,
I want to model the time in simulink model. The time as an output is required. i need to analyse the data being recieved from NXT is getting lost or not. The model which i have installed on NXT is done by using VU_LRT toolbox. The model is transmitting the data which is being displayed on Matlab-sceen when i call function file xyz.m but the system time in ticks/sec/ms is not getting saved anywhere. Though it might be simple but i am unable to do that. Please help me to model the time block and save the time along with the other output datas. You can refer VU-LRT samples to get an idea. Thank you.
-Shivanand

답변 (1개)

Gautam
Gautam 2025년 7월 1일
Hello, Shivanand
You can try the following steps:
  • Add Clock block to model time.
  • Combine time with your data using Mux.
  • Save combined signal using To Workspace or File Write block.
  • Analyze in MATLAB for missing data.
load('simout.mat'); % or your variable
time = simout(:,1);
data = simout(:,2:end);
dt = diff(time);
figure;
plot(dt);
title('Time difference between samples');
xlabel('Sample #');
ylabel('Time step (ms)');
% Look for spikes in dt indicating lost samples

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by