How To build a *.mat to Use The "From File" Block On Simulink?

2 ビュー (過去 30 日間)
Xiaoming
Xiaoming 2011 年 1 月 24 日
コメント済み: Shruti Yadav N 2016 年 8 月 12 日
I want to build an input *.mat with the Simulink Block 'From File',
Code like follows:
daten_sim = timeseries(daten, time);
save('daten_sim.mat','daten_sim');
Now I use the Simulink Block 'From File' to run the daten_sim.mat.
But I always get the same error:
Simulink does not support loading the input data in file 'daten_sim.mat'. For data saved using MAT file versions prior to 7.3, Simulink can only load two-dimensional arrays consisting of one-dimensional, double, noncomplex samples. To load data of any other type, complexity or dimension, use a timeseries object and save the file using MAT file version 7.3 or later. For example, use: 'save file_name -v7.3 timeseries_object'.
Actually my MATLAB is already the version 7.3. I have no idea where I am wrong.

採用された回答

Walter Roberson
Walter Roberson 2011 年 1 月 24 日
In Matlab versions from 7.3 onward, the default is still to use the -v7 MAT file version; you have to specifically use -v7.3 in order to get the extended file format.
  1 件のコメント
Shruti Yadav N
Shruti Yadav N 2016 年 8 月 12 日
Hi Where exactly do I change the settings? I seem to have the same problem while loading a .mat file in to a from file block. where is the path file->preferences-> general-> mat files found? As in where is the file? is it in matlab or the system files? Sorry if the question sounds a little dumb.
Thanks in advance
Shruti

サインインしてコメントする。

その他の回答 (1 件)

Xiaoming
Xiaoming 2011 年 1 月 25 日
Thanks you very much, after setup in the
File->Preferences->General->Mat Files
i changed the orginal set to v7.3
now it works very fine!
  1 件のコメント
Shruti Yadav N
Shruti Yadav N 2016 年 8 月 12 日
Hi Where exactly do I change the settings? I seem to have the same problem while loading a .mat file in to a from file block. where is the path file->preferences-> general-> mat files found? As in where is the file? is it in matlab or the system files? Sorry if the question sounds a little dumb.
Thanks in advance
Shruti

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeSimulink Functions についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by