sample time from "From Workspace" block

2 views (last 30 days)
Owen
Owen on 31 May 2014
Hello,
I connect a From Workspace Block with a To Workspace Block so that the variable in From Workspace can be read into To Workspace.
Some parameters: Variable ‘simin’ in the From Workspace:
simin = [1 10;2 20;3 30;4 40;5 50];
Simulation stop time = 5
Sample time = -1 (both blocks)
Type = Fixed-step
Solver = discrete
Fixed-step size = auto
I’d expected that the variable in the To Workspace ‘simout’ has values: 10; 20; 30; 40; 50 with the sample time 1 because of this description in From Workspace:
A two-dimensional matrix: The first element of each matrix row is a time stamp. The rest of each row is a scalar or vector of signal values. The leftmost element of each row is the time stamp of the value(s) in the rest of the row.
But in fact ‘simout’ has these values:
0;1;2;3;...;50 with the sample time of 0.1.
My question is: how to control the sample time with the first column just like the description above?
Senmeis

Answers (0)

Categories

Find more on Programmatic Model Editing in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!