Am new to MATLAB. Have an .xlsx file, like to know steps to import and create plots. Here is the structure of the file.
  1. 1. Total number of columns can be unknown; but with this dataset, it can be counted.
  2. 2. The first row are header names of each column.
  3. 3. Column data format is a mixture of decimal and text.
  4. 4. The text needs converted into decimal value (i.e., Off = 1, On = 0)
  5. 5. Total length of dataset can be unknown; but this dataset, it can be counted.
  6. 6. The dataset has a Zulu Date column and Zulu Time column.
  7. 7. The second row of data is the 'Unit of Measure' or interger/discrete.
If someone can get me started with instructions to import, use the dataset to develop plot and convert text into decimal values, in an XXXXX.m file; I believe once I see how the function is written, I feel can learn more with reading. Just like someone to do a 'Show and Tell'. Trying to learn MATLAB on own and always want to jump in the middle and struggle...LOL. Maybe getting too old and impatient???
Attached is the dataset file: Dataset_Plotting.xlsx
Appreciate anyone's assistance. The more the merrier - good to view others and come up with simplest.
Tim

1 Kommentar

Stephen23
Stephen23 am 29 Jan. 2017
Tim Ashcom's "Answer" moved here:
You smart people in the MATLAB world, anyone else dare to assist? Not asking for complete solution, just help to understand and visual.

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Image Analyst
Image Analyst am 29 Jan. 2017

0 Stimmen

Tim:
If you do this:
t = readtable('Dataset_Plotting.csv')
you'll see that the second headerline messes it up so that everything is now a string. Is it possible to get rid of the second header line? That would make it work. Or if you just swapped the first and second line, then you could tell readtable() to skip 1 header line. If you had to you could write out a second temporary file where you copied everything except the second line, then called readtable(), then delete the temporary file.

2 Kommentare

Tim Ashcom
Tim Ashcom am 29 Jan. 2017
Not sure whom I'm chatting with, but thanks for the prompt reply. Yes, the second header line can be deleted but may be better to inverse with first line; to retain for reference. Can a MATLAB swap these rows when reading/importing file?
Image Analyst
Image Analyst am 29 Jan. 2017
It can't swap them, but you can pass a variable to readtable() to tell it to skip that one header line. then the rest of it will import nicely into a table.

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by