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

Create a function in MATLAB!

  1. Jul 13, 2011 #1
    Hi all,

    I am trying to create a function in MATLAB for a table in Excel. Basically, I have to define a header (an array 34*1), waveform characteristics (that is an array 34*88), and finally data for the waveforms (that is a array 10001*88). Could you please help me on that??

    Thanks
     
  2. jcsd
  3. Jul 13, 2011 #2

    Pythagorean

    User Avatar
    Gold Member

    You really need to give more details. Questions:

    1)

    What do you want in the header (34x1 array)?

    a 34x1 array of characters will only hold 34 characters, so if you have 34 features to describe wave characteristics, you'll only be able to use one letter for each feature.

    2)

    I'm assuming these are meant to be two different tables (one with a text header above each column). Do they go on the same, separated by blank cells, or do they go on another sheet? Or am I totally misunderstanding your goal here?
     
  4. Jul 14, 2011 #3
    You are right. I would have explained more. Sorry about that.

    1) I would like to have some characteristics in the header like rise time, fall time,etc. Isn't it possible?

    2) Basically, There are not two different tables. Let me explain more. Header is not above each column, it is the first vertical column in the table, that's why I define the array like 34*1.

    There should not be anything above each column. I have the data right in front of the header and that's all for the top part of the table.

    For the bottom part (waveforms data), it starts exactly after the top part finishes (no blank cell between). That's why the array (10001*88) for that has the same columns like the waveform char data (34*88).

    I am trying to write MATLAB codes for that (basically a function) to easily access the data, instead of using Excel.

    Your help is greatly appreciated.
     
  5. Jul 15, 2011 #4
    why don't you use excel and let matlab read it?
     
  6. Jul 15, 2011 #5
    because I have to do it in the way I explained above.
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook