Error using Conv in matlab and don't know where's the problem.

조회 수: 3 (최근 30일)
Jimmy cho
Jimmy cho 2020년 12월 13일
답변: Jan 2020년 12월 13일
Hello guys.
I'm having two complex vectors, one is of length 20480000x1 which called dk, the other is 1x20 which called mf1.
so before two weeks I was doing this in matlab :
result=conv(dk,mf1,'same')
and all was fine I was getting output of convolution.
now Im doing the same thing but I get in my matlab editor this bug:
Error using conv
Too many input arguments.
any help please? I don't know what happened or what's the difference between before two weeks to today .. any help?
ofcourse the value of the vectors are complex for the both vectors.
dk is like this vector [1.00000000000000 - 1.00000000000000i; -1.00000000000000 + 1.00000000000000i;1.00000000000000 + 0.00000000000000i;-1.00000000000000 - 2.00000000000000i;0.00000000000000 - 1.00000000000000i;1.00000000000000 + 0.00000000000000i;-1.00000000000000 + 2.00000000000000i;-1.00000000000000 + 2.00000000000000i;0.00000000000000 + 0.00000000000000i;1.00000000000000 + 2.00000000000000i;2.00000000000000 + 2.00000000000000i;1.00000000000000 + 1.00000000000000i;2.00000000000000 + 2.00000000000000i;2.00000000000000 + 2.00000000000000i ....etc ]
mf1 is like this vector: [-1.00000000000000 - 1.22464679914735e-16i , -0.951056516295154 - 0.309016994374948i, ...etc];

답변 (1개)

Jan
Jan 2020년 12월 13일
Check, if you are using the function you expect:
which conv
Do you get: C:\Program Files\MATLAB\R2018b\toolbox\matlab\datafun\conv.m ?
Then try some test data:
x = rand(1, 1000) + 1i * rand(1, 1000);
y = rand(1, 10) + 1i * rand(1, 10);
r = conv(x, y, 'same');
Does this work? Then find out, what the difference to your situation is.

카테고리

Help CenterFile Exchange에서 Logical에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by