필터 지우기
필터 지우기

Error in port widths or dimensions

조회 수: 22 (최근 30일)
kartik
kartik 2012년 4월 24일
답변: Md Rakibul 2014년 2월 26일
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
kartik
kartik 2012년 4월 27일
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 2012년 4월 28일
http://www.mathworks.com/matlabcentral/answers/7924-where-can-i-upload-images-and-files-for-use-on-matlab-answers

댓글을 달려면 로그인하십시오.

답변 (4개)

Kaustubha Govind
Kaustubha Govind 2012년 4월 30일
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 2012년 4월 27일
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
kartik
kartik 2012년 4월 28일
Hi Guy i attached block dia in above link please take a look and advice me

댓글을 달려면 로그인하십시오.


java python
java python 2013년 1월 19일
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
Kaustubha Govind
Kaustubha Govind 2013년 2월 1일
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.

댓글을 달려면 로그인하십시오.


Md Rakibul
Md Rakibul 2014년 2월 26일
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?

카테고리

Help CenterFile Exchange에서 Startup and Shutdown에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by