Multi-Dimension Matrix input for Simulink Test R2022a
조회 수: 1 (최근 30일)
이전 댓글 표시
While creating test case inputs through the Simulink Test Signal Editor, I encounter the following error:
Time: [0 10]
Data: randn(1920. 1200)
I receive the error: "Data dimensions and time dimensions must be compatible"
Is there a way to create a multi-dimension matrix (in this case, just 2D) as an input for Simulink Test?
댓글 수: 0
답변 (1개)
Guilherme Costa Nascimento
2023년 11월 2일
Yes, you can create multidimensional signals in the Signal Editor. In your data, every column is treated as a separate "sub"-signal.You are getting this error because the number of rows in your data does not match the number of points in you time vector.
[0 10] is a 1x2 vector, so the Signal Editor expects your data to only have 2 rows, but your data has 1920 rows.
I think the following is what you are looking for
Time: linspace(0, 10, 1920)
Data: randn(1920, 1200)
댓글 수: 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!