MATLAB How can I create a MATLAB function for importing data from an Excel table?

  • Thread starter Thread starter Tina22
  • Start date Start date
  • Tags Tags
    Function Matlab
AI Thread Summary
The discussion revolves around creating a MATLAB function to organize data for an Excel table. The user needs to define a header as a 34x1 array containing characteristics like rise time and fall time, and two data arrays: one for waveform characteristics (34x88) and another for waveform data (10001x88). Clarification was sought on the structure of the table, confirming that the header will be the first vertical column without additional headers above the columns. The user emphasized the need for MATLAB to handle this data organization directly, rather than using Excel for initial setup, to streamline access to the data.
Tina22
Messages
5
Reaction score
0
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
 
Physics news on Phys.org
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?
 
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.
 
why don't you use excel and let MATLAB read it?
 
because I have to do it in the way I explained above.
 

Similar threads

Back
Top