Error: When loading a matrix input, the blocks loading the corresponding data columns of the matrix must specify dimension using a scalar
5 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I use MATLAB to create a variable weights. This variable is 11x216 in size.
I have a Simulink Inport, which expects an input matrix of 11x216.
I save the variable weights alongside other variables in a *.mat file.
Then, I use the Inport functionality of Simulink to import that *.mat file and use the Map Mode "Port Order" to input the data into my model.
However, I get the warning:
> When loading a matrix input, the blocks loading the corresponding data columns of the matrix must specify dimension using a scalar
This makes no sense to me.
- How to specify a matrix (2D!) with one scalar?
- Okay, they mean each data column. But how exactly do I specify the dimension of that data column? The inports do not provide such a functionality.
Can anyone help me here? I dont know what this error means. My variable type/dimensions match up with the input dimensions of that port.
0 commentaires
Réponses (1)
Fangjun Jiang
le 10 Fév 2023
In R2022b, open this doc and see the example model.
To import 2D data, there is a specific format which should be the same regardless from .mat file or from workspace.
web(fullfile(docroot, 'simulink/slref/read-2d-signals-in-structure-format-from-workspace.html'))
0 commentaires
Voir également
Catégories
En savoir plus sur Simulink Functions dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!