error using conv

조회 수: 3 (최근 30일)
kash
kash 2012년 1월 9일
I get error when using conv function
dataset=[10 89 87 56 28 96 58 ;1 5 70 59 30 18 25 ;14 20 89 87 100 54 20]
i want to find mid point for example
A=[3 5 6 15 17 21 35 45 46 51 56 57 66 70 71]'
i get answer as
4.0000
5.5000
10.5000
16.0000
19.0000
28.0000
40.0000
45.5000
48.5000
53.5000
56.5000
61.5000
68.0000
70.5000
using code F_mid = conv(A, [0.5 0.5], 'valid')
when i use this code for my dataset
i get error
Error using ==> conv at 27
A and B must be vectors.
Error in ==> new at 3
F_mid = conv(F, [0.5 0.5], 'valid')
please help

채택된 답변

Walter Roberson
Walter Roberson 2012년 1월 9일
The code you show that you are using is
F_mid = conv(A, [0.5 0.5], 'valid')
but your error message is for
F_mid = conv(F, [0.5 0.5], 'valid')
which does not occur anywhere in the code you show.
We do not have any information about the shape of F.
  댓글 수: 9
kash
kash 2012년 1월 9일
walter i get same error for my dataset
Walter Roberson
Walter Roberson 2012년 1월 9일
Whatever. Use a "for" loop then. Or use conv2()

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by