Error while importing signal data to signal builder

조회 수: 3 (최근 30일)
Aleksi Martikainen
Aleksi Martikainen 2018년 3월 20일
답변: Aniket 2025년 5월 7일
I have a Simulink model. I run the model and save output data from my model to workspace, save that data to a .mat file and import that data to a signal builder in another model. When I try to run the new model with the signal builder, I get an error:
"Error in [my model/Signal builder]: Initialization commands cannot be evaluated. Caused By: * In an assignment A(:) = B, the number of elements in A and B must be the same."
How do I solve this problem? I am using MATLAB R2017a.
  댓글 수: 2
Birdman
Birdman 2018년 3월 20일
Can you share your model?
Aleksi Martikainen
Aleksi Martikainen 2018년 3월 20일
Here is the model that produces the error in Matlab 2017a. The model has only the signal builder with the imported data. The data is imported from four different .mat files to seperate signal groups.

댓글을 달려면 로그인하십시오.

답변 (1개)

Aniket
Aniket 2025년 5월 7일
This error occurs because the data saved in the Dataset has fixed-point data type. To remove this error in R2017a, please convert the signals to doubles before logging.
The error should not occur in R2017b with the same fixed-point Dataset.
Hope this helps!

카테고리

Help CenterFile Exchange에서 Signal Import and Export에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by