Why Root-Level Inport didn't inherit the sample time?
조회 수: 1 (최근 30일)
이전 댓글 표시
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161119/image.png)
Because the model doesn't restricted to any specific sample time, I set the solver pane as following.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161120/image.png)
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.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/161121/image.png)
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
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Outputs에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!