I kept on getting error that says "Error in port widths or dimensions. 'Output Port 1' of 'simulink_​controller​/Sum2' is a [2x2] matrix."

3 visualizaciones (últimos 30 días)
How can I solve the mentioned error? I couldn't figure out as I am new to simulink.
Thank you.
  3 comentarios
Pramod Sapkota
Pramod Sapkota el 30 de Mayo de 2020
This is my simulink model. I have code written in matlab for lqr controller with non zero set point. I have 2 states x1 and x2 but my output of interest is x2 only. I get two errors :
Error in port widths or dimensions. 'Output Port 1' of 'simulink_PNZSP_controller/Sum2' is a [2x2] matrix.
Component:Simulink | Category:Model error
Error in port widths or dimensions. Invalid dimension has been specified for 'Input Port 1' of 'simulink_PNZSP_controller/integrator'.

Iniciar sesión para comentar.

Respuestas (1)

Walter Roberson
Walter Roberson el 30 de Mayo de 2020
Pass the output of the Sum2 block through a Selector block https://www.mathworks.com/help/simulink/slref/selector.html
  1 comentario
Pramod Sapkota
Pramod Sapkota el 31 de Mayo de 2020
I tried using that block still, it shows the same error since the error is shown in the output port of sum block before output reaches the selector block.

Iniciar sesión para comentar.

Categorías

Más información sobre Multicore Processor Targets en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by