필터 지우기
필터 지우기

error while using "from file" block in SIMULINK

조회 수: 4 (최근 30일)
Harish Balaga
Harish Balaga 2011년 6월 9일
i am using "from file" block in simulink. the time stamp in the file starts from 0 and ends at0.2 sec(nondecreasing). but simulink is showing the follwing error.
"Time values must be monotonically non-decreasing." what should i do? if i use some other similar file, this problem is not there.

답변 (2개)

Andreas Goser
Andreas Goser 2011년 6월 9일
In case this is a very individual issue, I suggest contacting Technical Support and provide your files.
I have one suggestion for troubleshooting. Load your file into the MATLAB workspace and then test your time variable (assuming t)
t=[1 2 3 4 6 5 7 8] % test data with an artifical issue
[test, ix]=find(diff(t)<0)
ix return a position were the data is nondecreasing
  댓글 수: 2
Harish Balaga
Harish Balaga 2011년 6월 9일
i tried it and the result is an empty matrix :-(
Andreas Goser
Andreas Goser 2011년 6월 9일
I would expect that an empty time vector is seen as nonincreasing. The root cause may be a very differnt one then. WHY is the time variable empty?

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


Arnaud Miege
Arnaud Miege 2011년 6월 9일
As Andreas suggest, load your MAT file in MATLAB and re-order the data so that the time values are monotonically increasing. You'll probably find that sortrows is useful for that. Once you have re-ordered your data, save it to a different MAT file and use that file with the From File block.
HTH,
Arnaud
  댓글 수: 2
Harish Balaga
Harish Balaga 2011년 6월 9일
i cannot sort them as i need to send the data in the same order
Arnaud Miege
Arnaud Miege 2011년 6월 9일
But the time vector needs to be in ascending order, you can't "go back" in time. How was the file generated?

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

카테고리

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