Matlab Simulink RepMat Execution Time
조회 수: 1 (최근 30일)
이전 댓글 표시
Dear All,
I need a significant help.
I have a Simulink model that has a subsystem that takes a matris [3x1] and makes it [3x11] by just adding them side by side. Normally we were doing that with vector concatenate and it takes nearly 1 ms. With time optimization processes, we decreased that to 0.95 ms but that is too much for us. We need to decrease that value at least half of 1 ms.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/436708/image.png)
My function is basically a repmat. And it takes nearly 0.95 ms on the hardware.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/436713/image.png)
Since operation is not complex at all, we believe that there should be a less time-consuming way.
Any help will be appreciated.
Thanks.
댓글 수: 1
Ameer Hamza
2020년 12월 1일
Have you inspected the generated code? That might give some hints on why it is taking too long.
답변 (1개)
Walter Roberson
2020년 12월 1일
persistent idx11
if isempty(idx11)
idx11 = ones(1,11);
end
y = u(:, idx11) ;
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Functions에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!