フィルターのクリア

Info

この質問は閉じられています。 編集または回答するには再度開いてください。

HELP how to solve this error code : Error using .* Matrix dimensions must agree.

2 ビュー (過去 30 日間)
Yassine Bouchdoug
Yassine Bouchdoug 2014 年 8 月 21 日
閉鎖済み: MATLAB Answer Bot 2021 年 8 月 20 日
Hi, Well in fact I have a problem with my code which is generating the error below, could you help me to solve this please, here's a part of the code :
[val_maxfft(icurv,:),loc_maxfft(icurv,:)]=(max(Y0fft(:,1,icurv)));
freqY0=(1:Ndf)*df;
PhiY0_decal=-2*pi*(freqY0')*(loc_maxfft(icurv,:)-1);
PhaseY0_shift=complex(cos(PhiY0_decal),sin(PhiY0_decal));
Arg_Phase_shift=atan(imag(PhaseY0_shift)./real(PhaseY0_shift))
Y0fft=Y0fft.*PhaseY0_shift;
Y0_BP=Y0fft(loc_maxfft(icurv,:):loc_maxfft(icurv,:)+Ndfmax-1,1,1);
The error is generated for this line: Y0fft=Y0fft.*PhaseY0_shift;
And thank you for your help

回答 (1 件)

Rick Rosson
Rick Rosson 2014 年 8 月 21 日
編集済み: Rick Rosson 2014 年 8 月 21 日
What are the results of:
size(Y0fft)
size(PhaseY0_shift)
They need to be the same size and shape to use the .* operator.
  2 件のコメント
Yassine Bouchdoug
Yassine Bouchdoug 2014 年 8 月 21 日
Here's the result :
size(Y0fft)
ans =
42823 1 2
>> size(PhaseY0_shift)
ans =
42823 1
I know that they have the same size, but I don't know how to do it, i''m a little confused.
Yassine Bouchdoug
Yassine Bouchdoug 2014 年 8 月 21 日
I know that they should* have the same size, but I don't know how to do it, i''m a little confused.
Sorry for the mistake.

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by