フィルターのクリア

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 Center および File ExchangeStartup and Shutdown についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by