Can I multiply a Vector with a Matrix?

Hi;
Sorry for my english. I've a big problem, I want multiply a vector by a matrix:
ES: A=< 1x1250 double >; B= is a matrix < 421x421 double >;
C=A*B; ??? Error using ==> Inner matrix dimensions must agree
or if
C=A.*B; ??? Error using ==> times Matrix dimensions must agree.
Please help me!!! Thanks

댓글 수: 1

Matt J
Matt J 2012년 10월 29일
편집: Matt J 2012년 10월 29일
What are the dimensions of B and do you want element-wise multiplication C(i)=A(i).*B(i) or do you want matrix-sense multiplication?

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

 채택된 답변

Jan
Jan 2012년 10월 29일

1 개 추천

In the expression A*B the number of columns of A must equal the number of rows of B.

추가 답변 (1개)

Matt J
Matt J 2012년 10월 29일

1 개 추천

In the expression A.*B, the matrices A and B must have the same number of rows and columns.

카테고리

도움말 센터File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

질문:

2012년 10월 29일

Community Treasure Hunt

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

Start Hunting!

Translated by