필터 지우기
필터 지우기

Using the From File data

조회 수: 2 (최근 30일)
Ana U
Ana U 2011년 6월 20일
Hi,
I'm using the 'From File' block to import data from a .mat file to Simulink. My problem is that I don't know how to select the data from my .mat file.
My file has 2 rows, the first one represents a time vector and the other represents my data. How can I select each row of the .mat file form the output of the 'Form File' block, so that I can work with each row as an individual vector?
Thanks in advance.
Best regards, Ana

채택된 답변

Arnaud Miege
Arnaud Miege 2011년 6월 20일
You can't. Simulink is time-based, so it will use the data stored in your MAT file to output at each time step the relevant value of the signal. Since you only have one signal in your MAT file, the output of the block will be the value of that signal at each time step. Have a look at the documentation for more details.
HTH,
Arnaud
  댓글 수: 3
Paulo Silva
Paulo Silva 2011년 6월 20일
The first element of each column contains a time stamp. The remainder of the column contains data for the corresponding output values.
First row is the time and each of the other rows represents one output, each row can be considered a vector.
data=[t1 t2 t3...;u1 u2 u3...;v1 v2 v3...]
Arnaud Miege
Arnaud Miege 2011년 6월 20일
Have a look at this similar question:
http://www.mathworks.co.uk/matlabcentral/answers/7678-data-stored-in-workspace

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Sources에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by