sample time from "From Workspace" block
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Programmatic Model Editing 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!