0
votes

I am trying to load my data into my simulation model from .mat file in Simulink with "From file" block. I am using Matlab 2012a. My data file is one dimensional vecor of real numbers (type double) with dimensions 1x200.

When I run my simulation I am getting following error: Simulation error

In Matlab preferences, I have already set the setting "Save MAT-files that can be loaded in" to option "Matlab version 7.3, or later", but this does not work. I have also tested this approach without success: http://www.mathworks.com/matlabcentral/answers/47422-simulink-does-not-support-loading-the-input-data-in-file
I would be thankful for any ideas.

1
Please try to create am minimal reproducible example. What is the content? Is just a from file block required to reproduce your problem?Daniel
@Daniel I believe, that my problem is self-explanatory. I have certain data in .mat file and I would like to use them in my simulation model in Simulink with the use of "from file" block. However I am getting this error when using this block. I would like to know what could cause this error and how to avoid it.user2179427

1 Answers

4
votes

As per the documentation in the From File block help (obtained by pressing the Help button on the block dialog):

Matrix format can be used only for vector, double, noncomplex  signals. Each
column of the matrix must have a time stamp in the first row and a vector
containing the corresponding data sample in the subsequent rows.

Your 1x200 vector does not match this format. You need to add a first row that represents time.