フィルターのクリア

how to concatenation matrices

3 ビュー (過去 30 日間)
segun
segun 2015 年 1 月 9 日
編集済み: segun 2015 年 1 月 13 日
I tried to execute this which is part of a program i got this error message on the Q1 line(2nd line):
??? Error using ==> vertcat
CAT arguments dimensions are not consistent.Please any hint on what to do to correct it?
P1 =[P111 P112; P121 P122];
Q1=[Q111 Q112; Q121 Q122];
V=[V11 V12 ; V21 V22];
Q2=[Q211 Q212 ; Q221 Q222];
P2 = [P211 P212; P221 P222];
W = (P1*Q1*V*Q2*P2);
  8 件のコメント
Image Analyst
Image Analyst 2015 年 1 月 13 日
It's not the whole code. Why do you make it difficult for us to help you? Please read this. The code is not formatted. Once I fixed that, there was an extra end in there. Once I fixed that, it said f was not define (a different error than you're asking about). After that I gave up.
segun
segun 2015 年 1 月 13 日
編集済み: segun 2015 年 1 月 13 日
Sorry for the trouble , i have checked and corrected it .Thanks as i await your help.

サインインしてコメントする。

回答 (1 件)

Image Analyst
Image Analyst 2015 年 1 月 10 日
You are kidding me. Don't tell me you've been working on this since last July and still don't have a solution that works yet. http://www.mathworks.com/matlabcentral/answers/141425-syntax-to-multiply-two-by-two-matrices-with-zeros-in-it-with-numbers
Why not just learn how to debug http://blogs.mathworks.com/videos/2012/07/03/debugging-in-matlab/, or, worst case, just put a bunch of "whos" commands in there to find out what the rows and columns of all your arrays are. If you stitch together horizontally, they must have the same number of rows. If you stitch together vertically, they must have the same number of rows.
  1 件のコメント
Stephen23
Stephen23 2015 年 1 月 10 日
Small correction: "If you stitch together horizontally, they must have the same number of rows. If you stitch together vertically, they must have the same number of columns".

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeCreating and Concatenating Matrices についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by