Elements of the input after a sum block
10 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hi, I have a Simulink model that contains a feedback. After the feedback, I should do some discrete convolution on the input. The problem is the following. My input is given by my time vector, and two columns that are my two input currents. The system (should) looks like this
But, I get the error "Invalid external input specified. The specified input has 2 element(s) for each sample while the sum of the port widths of all root level input port blocks in the model is 1". Even though I checked and after the sum block I have a signal that has the same dimension of the input (so, time and two colums for the currents). Also, above the arrow, there is a "2", so I see that also after the sum block I have 2 elements. Instead, if I do this
I do not get any errors. But this is not what I should do... I think that has something to do with the feedback and the very first sample time. But I am not sure how to solve this issue. If this is the issue. Any suggestion is appreciated. Best Maria
2 commentaires
Réponse acceptée
Birdman
le 5 Déc 2017
Do not supply workspace variables into a Simulink model by root level inport. Instead, usage of From Workspace blocks are more efficient and easier. I made some changes to your model where you had problems with dimension. The mat file variables are automatically loaded when you open the model. Now, rearrange the model if you need to and the simulation should run without any error. Let me know the results.
2 commentaires
Birdman
le 5 Déc 2017
The problem was that you did not know what to do with dimension while using root level inport. But now it is solved.
My pleasure!
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Sources dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!