Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Mock Matlab Data

  1. May 19, 2007 #1

    Pythagorean

    User Avatar
    Gold Member

    I want to work on a bandpass filter program, but I'd like some realistic data to try it on. There's got to be something on the web to write/test programs with.

    Any suggestions?
     
  2. jcsd
  3. May 19, 2007 #2

    Pythagorean

    User Avatar
    Gold Member

    to be more specific, it's wave data I'm looking to transform, not image data.

    Infrasound data is most relevent, but any amplitude vs. time data will do.

    It doesn't even really have to be mock as long as it's downloadable and in txt or m format.
     
  4. May 19, 2007 #3

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Why don't you just create your own test signals?

    - Warren
     
  5. May 19, 2007 #4

    Pythagorean

    User Avatar
    Gold Member

    How would I generate data? I imageine using rand and sin functions, but I want to make sure that it's actually transformable, so any mistakes are in the code and not in the data I generated.
     
  6. May 19, 2007 #5

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    It's just a bandpass filter, right? So any continuous (or sampled) data of any kind would be fine. I don't know what you mean by "transformable."

    - Warren
     
  7. May 19, 2007 #6

    Pythagorean

    User Avatar
    Gold Member

    By transformable, I mean transformed from amplitude (pressure) vs. time, into amplitude vs. frequency, where you cut out the frequencies you don't want, then transformed back into amplitude vs. time.

    I guess I should know that any continuous function can be transformed like that, I just want to make sure it's somewhat relevant to what I do at work (which is analyzing infrasound signals)

    edit: I'll try throwing the rand function into a sin function unless you have a better idea that's relevant.
     
  8. May 19, 2007 #7

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Just compose a signal that's a sum of some number of sinusoids, some of which should be attenuated by your filter.

    Or, use some of MATLAB's built-in data sets like chirp or handel.

    - Warren
     
  9. May 19, 2007 #8

    Pythagorean

    User Avatar
    Gold Member

    Wow, didn't know about those. Thanks for your help, Warren!
     
  10. May 19, 2007 #9

    chroot

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Haaaaallelujah! :biggrin:

    - Warren
     
  11. May 19, 2007 #10

    Pythagorean

    User Avatar
    Gold Member

    I feel kind of stupid after giving this a little more thought, it's as easy as:

    Amp = sin(w1*t) + sin(w2*t) + sin(w3*t) + cos(w4*t) + cos(w5*t)

    where t is your equally spaced time array and the Wn are simply constants.

    whew, that grain of sand was tough to climb...

    I have the student version of Matlab at home, don't know if chirp or handel come with it, but I can't seem to find them. I like making my own data better though!

    Thanks once again!

    edit: HA! I found the chirp/handel and played them, now I see where the Hallelujah! came from..
    This rocks, I could totally write music in matlab...
     
    Last edited: May 19, 2007
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?



Similar Discussions: Mock Matlab Data
  1. Matlab data to c# help (Replies: 1)

Loading...