Bark Band Spectrum, Surf(....
Bark Band Spectrum, Surf(....
(OP)
Hi,
i'm trying to plot an sound (http://www.jarkonkotisivu.org/temp/sound.mat) and the goal is to get this (http://www.jarkonkotisivu.org/temp/spectrum.JPG) but i get an error:
Warning: Z must not be a scalar or vector, not rendering surface.
Here is the problematic program:
------------ And the variables are:
ID=identifier of the variable: dBID+n°ID dBFA32
nom=name of the variable : ID(comment) (string)
periode=period (time step)
imin=index of the min band (1 to 24)
unite=unit (string)
Any idea why max(ID,0) is an scalar or vector?
i'm trying to plot an sound (http://www.jarkonkotisivu.org/temp/sound.mat) and the goal is to get this (http://www.jarkonkotisivu.org/temp/spectrum.JPG) but i get an error:
Warning: Z must not be a scalar or vector, not rendering surface.
Here is the problematic program:
CODE
function bark(ID,nom,periode,imin,unite)
nb=size(ID);
t=1:1:nb(2);
f=1:1:nb(1);
f=(f-1)+imin;
vect_t=(t-1)*periode;
surf(vect_t,f,max(ID,0));
shading interp;
rotate3d;
xlabel('Time (s)');
ylabel('Bark Band');
aff=sprintf('%s',unite);
zlabel(aff);
view(0,90);
title(nom);
nb=size(ID);
t=1:1:nb(2);
f=1:1:nb(1);
f=(f-1)+imin;
vect_t=(t-1)*periode;
surf(vect_t,f,max(ID,0));
shading interp;
rotate3d;
xlabel('Time (s)');
ylabel('Bark Band');
aff=sprintf('%s',unite);
zlabel(aff);
view(0,90);
title(nom);
ID=identifier of the variable: dBID+n°ID dBFA32
nom=name of the variable : ID(comment) (string)
periode=period (time step)
imin=index of the min band (1 to 24)
unite=unit (string)
Any idea why max(ID,0) is an scalar or vector?




