simulink from file source block
이전 댓글 표시
I am trying to load some data that is generated in matlab into a source "from file" block in simulink. I use the following statement in my matlab script to save the data:
save awng.mat Y_awgn_scale -v7.3;
I tried a few different flavours with saving the time step etc and none of it works. I can load the data into the workspace which shows the data in awng.mat to be a one dimensional array of type double:
However, If I specify the file name in a "from File" source block, upon trying to load, I get an error message:
Simulink does not support loading the input data in file 'C:\Users\marka\Documents\MATLAB\awng.mat'. Simulink can only load two-dimensional arrays or timeseries objects. The array must consist of one-dimensional, double, noncomplex samples. To load data having a different type, complexity, or dimension, use a timeseries object. For either an array or a timeseries object, at least one sample point is necessary.
This error message is confusing. Does the array needs to be two dimensional or one? I tried adding a variable that had the time stamp and it did not do anything. I have left all the settings in the "fromFile" simulink block as default. I am using 2012a release.
Can you post a sample file that is read in or specify what save command needs to be used to save a simple array of data of type double I need to use so that I can load it into "from file" source?
Thanks,
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Sources에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!