필터 지우기
필터 지우기

How to create a simulink signal read from csv file at run time

조회 수: 20 (최근 30일)
Ahmed Samy
Ahmed Samy 2016년 10월 15일
편집: Ahmed Samy 2016년 10월 15일
i have a QEMU ARM CPU running and toggle PIN (by GPIO Model) and dump the values at run time on a CSV File (Kindly note, tat the signal values is changing at runtime). So I need to make a simulink Model which is polling on this CSV File and read the (time/value) and genrate Matlab simulink signal to connect to scope as shown on the attached image
I dreaming to make like that but I don't know how to start

답변 (2개)

Muhammad Usman Saleem
Muhammad Usman Saleem 2016년 10월 15일
try this
mydata=csvread('yr csv file');
time=mydata(:,1); %assuming first column in csv file is time
amp=mydata(:,2) % assuming first column in csv file is amplitude corresponding to time
h=plot(time, amp);
now give this h to scope try this?

Ahmed Samy
Ahmed Samy 2016년 10월 15일
Thank you very much for trying to help me, but i need 1.to create a model on matlab simulink read any change happen on CSV File and generate a block signal with (time and value). So i don't have how the simulink model will sense any update at run time. as shown below
2.i tried to use "csvread" on matlab function simulink model but i got those errors

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by