Clear Filters
Clear Filters

Timestamp Error in Simulink From Workspace Block

7 views (last 30 days)
Error: "'myOneLegSys/heave +1' has specified an invalid workspace variable as input. Time values should not decrease."
I put the matrix I entered in the from workspace block of the simulation link and ran it, and this error occurred. "MyOneLegSys/heave +1's has been specified an invalid workspace variable as input. Time values should not be specified." From workspace block, the description says, "For matrix types, It says "each row of a matrix contents in the first column and then a vector with the corresponding data sample in the next column", but do I have to make a time vector for the size of the matrix to call up the element values of the matrix?
  1 Comment
檮杌
檮杌 on 4 Oct 2023
It would be helpful if you can share the matrix that you tried to use in the "From Workspace" block. Also, it would be good if you can share your Simulink model to reproduce your issue. It's hard to decipher what the issue is only with your description.

Sign in to comment.

Accepted Answer

Kilsu Kim
Kilsu Kim on 4 Oct 2023
Hello,
If you just want to use matrix or array as a constant value in Simulink, you can simply use "Constant" block instead of "From Workspace" block.
"From Workspace" block is for loading signal data, and you need to use specific formats supported by "From Workspace" block. The following documentations contain many examples of how to load signal data in various formats using "From Workspace".
- From Workspace
- Load Data Using the From Workspace Block

More Answers (0)

Tags

Products


Release

R2023a

Community Treasure Hunt

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

Start Hunting!