error using conv

2 visualizaciones (últimos 30 días)
kash
kash el 9 de En. de 2012
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

Respuesta aceptada

Walter Roberson
Walter Roberson el 9 de En. de 2012
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 comentarios
kash
kash el 9 de En. de 2012
walter i get same error for my dataset
Walter Roberson
Walter Roberson el 9 de En. de 2012
Whatever. Use a "for" loop then. Or use conv2()

Iniciar sesión para comentar.

Más respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by