Fs = 5000; Fc = 2000; t = [0:Fs-1]'/Fs; m = cos(2*pi*(20)*t); mhilb = conv((1/pi*t),m);
s = m.*cos(2*pi*Fc*t) + mhilb.*sin(2*pi*Fc*t); plot(t,s)
Error Error using .* Matrix dimensions must agree.
Please HELP!!!!

 채택된 답변

Henrik
Henrik 2015년 1월 16일

0 개 추천

If you format your code it's easier to read for people here.
The error message means that some of the matrices that you multiply are not the same size.
It's mhilb that's different, try
mhilb = conv((1/pi*t),m,'same');

댓글 수: 1

qusay hawari
qusay hawari 2015년 1월 16일
Thanks it worked! ya i will format my codes next time(its my first time). :)

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

추가 답변 (0개)

카테고리

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

질문:

2015년 1월 16일

댓글:

2015년 1월 16일

Community Treasure Hunt

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

Start Hunting!

Translated by