sample time from "From Workspace" block

3 次查看(过去 30 天)
Owen
Owen 2014-5-31
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

回答(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