I am getting error when i try to listen mat file
Mostrar comentarios más antiguos
Hi i am having mat file its name is sig.mat it is having dtmf tones in it
i m using
x=load('sig.mat');
soundsc(x,8000)
and i am getting error
??? Undefined function or method 'min' for input arguments of type 'struct'.
Error in ==> soundsc at 27 xmin = min(x(:));
Respuesta aceptada
Más respuestas (3)
moonman
el 31 de Oct. de 2011
1 comentario
Wayne King
el 31 de Oct. de 2011
enter fieldnames(x) and see what you really want to listen to
Please see my comment above:
for example if you tried:
x = struct('data',randn(1e3,1));
soundsc(x,8000)
You would get that error. But
soundsc(x.data,8000)
is fine
moonman
el 31 de Oct. de 2011
1 comentario
Wayne King
el 31 de Oct. de 2011
That is not per my instructions. I was constructing a struct array as an example. You have entered:
x = load('sig.mat');
x is a structure array, you cannot play a structure array with soundsc(), you have to play a field of a structure array. Enter
fieldnames(x)
and see which part of x you really want to play.
Categorías
Más información sobre Logical en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!