Why Root-Level Inport didn't inherit the sample time?
1 view (last 30 days)
Show older comments
Hi guys,
I want to build a fixed-step discrete time model, which will be referenced later in a larger model. To simplify the issue, let's say it's just a direct-through, including only one input port connected to one output port.
Because the model doesn't restricted to any specific sample time, I set the solver pane as following.
Before I actually reference it to the real larger model, I want to do a quick test using base workspace variables. Here is the settings of the Data Import/Export pane.
And here is how I constructed my test signal.
t = (0 : 0.1 : 10)';
u = rand(size(t));
After I ran the model, I found that the output signal y has fewer samples than the input signal x. This is due to the fact that it has a default sample time (0.2).
>> whos
Name Size Bytes Class Attributes
t 101x1 808 double
u 101x1 808 double
y 51x1 408 double
How can I make the model inherit the sample time of the external test signal correctly?
Thanks!
0 Comments
Answers (0)
See Also
Categories
Find more on Outputs in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!