필터 지우기
필터 지우기

Problem by importing data into simulink as "Array From Workspace"

조회 수: 9 (최근 30일)
Anna B.
Anna B. 2023년 7월 12일
답변: Nils Hornik 2023년 7월 13일
invalid workspace variable specified as workspace input in 'power_controlcurr/Array From Workspace'. Time values must be non-decreasing.
  댓글 수: 3
Anna B.
Anna B. 2023년 7월 13일
yes, i have already checked it, the dt is always constant and t i not decreasing.
Harald
Harald 2023년 7월 13일
Hi Anna,
it is difficult to tell why Simulink would error because of a variable having to be non-decreasing when you say it is.
If possible, please upload the model and the required data. Both can be trimmed down to what is needed to reproduce the problem.
Best wishes,
Harald

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

채택된 답변

Nils Hornik
Nils Hornik 2023년 7월 13일
Hi Anna,
For this Block the "time values must increase monotonically" as stated here in the doc: Load Data Using the From Workspace Block - MATLAB & Simulink (mathworks.com)
In such cases I would reccomend to use the following functions to find out where in a (potentially large) time vector a decrease occurs.
  • issorted() to find out if there are non-increasing elements in the vector
  • find() e.g.: find(diff(t)<0) to find the effected indecies/lines
Hope that helps,
Nils

추가 답변 (0개)

카테고리

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

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by