How to create a simulink signal read from csv file at run time
37 次查看(过去 30 天)
显示 更早的评论
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
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/157167/image.jpeg)
I dreaming to make like that but I don't know how to start
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/157168/image.jpeg)
0 个评论
回答(2 个)
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?
0 个评论
另请参阅
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!