Error in port widths or dimensions

19 visualizaciones (últimos 30 días)
kartik
kartik el 24 de Abr. de 2012
Respondida: Md Rakibul el 26 de Feb. de 2014
Hi, I am getting error like"Error in port widths or dimensions. Output port 1 of 'Furutroo/Compensator/y' is a one dimensional vector with 4 elements." I am using state-space block with single i/p and o/p. My all metrices are as follows
Acroo =
1.0e+004 *
0.8113 -0.5777
1.2184 -0.8680
Dcroo =
76.6721 21.3142
Bcroo =
1.0e+005 *
-0.7663 -0.2115
-1.1516 -0.3146
Ccroo =
-8.1284 5.7804
please help me how can i resolve the problem. If you want files give me your e-mail id. My id is knp28@njit.edu.
hit on search by image, you will able to see block dia
Regards, kartik pathak
  3 comentarios
kartik
kartik el 27 de Abr. de 2012
Hi Kaustubha,
I could not able to upload or paste model herecan you give me your e-mail id so that i can send it to you directly?
Walter Roberson
Walter Roberson el 28 de Abr. de 2012
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers

Iniciar sesión para comentar.

Respuestas (4)

Kaustubha Govind
Kaustubha Govind el 30 de Abr. de 2012
Your input to the State-Space block has a dimension of 1x4, but B has dimensions 2x2 - this doesn't make sense because you can't multiple a 2x2 matrix with a 1x4 vector. Your input must be a vector of 2 elements as Guy suggested.

Guy Rouleau
Guy Rouleau el 27 de Abr. de 2012
I don't know where the 4 comes from in your error message, but your B and D matrices have 2 columns, so your system should have 2 inputs.
Try leaving unconnected or grounded lines where the error is and display the signal width (from the format menu). this should help understanding what's going on.
  1 comentario
kartik
kartik el 28 de Abr. de 2012
Hi Guy i attached block dia in above link please take a look and advice me

Iniciar sesión para comentar.


java python
java python el 19 de En. de 2013
I have a simulink model of UAV model which ran fine in 2010b and 2012a model in my school's computer. But when run exact same block in 2012b, it guves me the error message ,"Error in port widths or dimensions. Output port 1 of ...." . In the bottom window, it says "Error in port widths or dimensions. Input port 1 of 'sldSim/sldDynamics/MATLAB Fcn' has 17 elements. This port does not accept the dimensions (or orientation) specified by the input signal."
I don't see any non-uniformity with the dimensions. Even if there was a problem why would it run in previous versions ? Does 2012b simulink has any bugs ? Please help me .
  1 comentario
Kaustubha Govind
Kaustubha Govind el 1 de Feb. de 2013
Sumit: Your question is unrelated to this thread (despite the error message being the same) because the cause is clearly different. Please start a new question.

Iniciar sesión para comentar.


Md Rakibul
Md Rakibul el 26 de Feb. de 2014
I have similar problem but not related to input/matrix size. One of my file works in my workplace MATLAB but does not work in my personal laptop. it gives "Error in port widths or dimensions. Output port 1 of 'ueki1/control+robot/robot/f1/Invm*(tau-C-g)' has 3 elements. This port does not accept the dimensions (or orientation) specified by the output signal." But I know there are no errors in dimensions. Previously I solved this problem by removing extra sign in summation block. Lets say you added 3 inputs in summation block. Then you decided to remove one input but kept the summation block as +++ instead of ++ which gives problem in dimension. It worked last time. But this time still been trying to look in the file for the same issue. But did not find anything like that. Any Idea please GUY or Kausthuba?

Categorías

Más información sobre General Applications 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