home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / comp / softsys / matlab / 215 < prev    next >
Encoding:
Internet Message Format  |  1993-01-28  |  1.4 KB

  1. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!usenet.coe.montana.edu!news.u.washington.edu!atmos.washington.edu!joeb
  2. From: joeb@atmos.washington.edu (Joe Barsugli)
  3. Newsgroups: comp.soft-sys.matlab
  4. Subject: Re: Question about sounds ...
  5. Date: 26 Jan 93 18:37:00
  6. Organization: Dept. of Atmospheric Sciences, University of Washington
  7. Lines: 33
  8. Message-ID: <JOEB.93Jan26183700@eos1.atmos.washington.edu>
  9. References: <1993Jan26.221528.28231@en.ecn.purdue.edu>
  10. NNTP-Posting-Host: eos1.atmos.washington.edu
  11. In-reply-to: kihlstro@en.ecn.purdue.edu's message of Tue, 26 Jan 93 22:15:28 GMT
  12.  
  13. In article <1993Jan26.221528.28231@en.ecn.purdue.edu> kihlstro@en.ecn.purdue.edu (Merlin) writes:
  14.  
  15.    I have a question out there for people who use Matlab 4.0a
  16.    (I am running it on a sun sparc workstation)
  17.    How do you get the sounds to work? I am only to get niose
  18.    when I tried using it.  Has anyone used it? 
  19.    Can someone post a little blirb on the basics of using it.
  20.    Thanks..
  21.  
  22.    Cory
  23.  
  24.  
  25. Well, we just got matlab4.0 here and I played with the sound
  26. capability a bit (I "sonified" some of my data, much to my colleagues
  27. shock).  Just generate a long vector and play it.  On Sparcs the
  28. vector is sampled at something like 8192 Hz, that is, a vector of
  29. length 8192 will play for one second. 
  30.  
  31. Try 
  32.  
  33. t = 1:8192;
  34. f = 440;
  35. x = sin(2*pi*f*t/8192);
  36. sound(x);
  37.  
  38. or 
  39.  
  40. x = sin(2*pi*t.*t/8192);
  41. sound(x);
  42.  
  43. Good Luck,
  44.  
  45. Joe Barsugli (joeb@atmos.washington.edu)
  46.