How to solve "Error in port widths or dimensions"

15 visualizzazioni (ultimi 30 giorni)
粤轩 杨
粤轩 杨 il 18 Apr 2023
Risposto: Balavignesh il 24 Apr 2023
Hi, I met an error in port widths when trying to solve RLC circuit with MATLAB Simulink.
My Simulink model of RLC circuit and errors are shown below.
For your information, "assignment4.mat" in the input port is attached to this question ticket.
How can I solve this kind of error about port widths?
Error in port widths or dimensions. 'Output port 1' of 'SimulinkModel_Assignment4/powergui/EquivalentModel1/Sources' is a one dimensional vector with 404 elements.
Error in port widths or dimensions. 'Input port 1' of 'SimulinkModel_Assignment4/powergui/EquivalentModel1/State-Space' is a one dimensional vector with 1 elements.

Risposte (1)

Balavignesh
Balavignesh il 24 Apr 2023
As per my understanding, you are encountering the error “Error in port widths and dimensions” when trying to simulate RLC circuit in Simulink.
To resolve the error, double click on the blocks ‘SimulinkModel_Assignment4/powergui/EquivalentModel1/Sources’ and ‘SimulinkModel_Assignment4/powergui/EquivalentModel1/State-Space’ for which the error is thrown, check their data size and dimension and verify that the properties are set correctly. The error is likely due to the mismatch of the dimensions.
For more information, you can refer the following link:
I hope this helps you resolve the error.

Categorie

Scopri di più su Simulink in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by