Simulink from file block
古いコメントを表示
I created *.mat file in Matlab and wanted to load data into simulink using a block "from file" . The text of Matlab code :
% Create some variables
x = 1;
y = 1;
z = 4;
p = 2;
% Save the variable x,y,z,p into one *.mat file
save test.mat
When i try to upload a file to simulink block "From file" i get next error: Error encountered in block 'untitled/From File'
Caused by: Simulink does not support loading the input data in file 'test.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.
回答 (1 件)
Azzi Abdelmalek
2016 年 2 月 8 日
編集済み: Azzi Abdelmalek
2016 年 2 月 8 日
0 投票
read the help http://www.mathworks.com/help/simulink/slref/fromfile.html your data should be stored as a Matrix or as timeseries
カテゴリ
ヘルプ センター および File Exchange で Modeling についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!