×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Bark Band Spectrum, Surf(....

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:

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);
------------ 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?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources