how to read in unequal columns from an excel sheet

Hello
I have an excel sheet with four column that are unequal in size
How would I read them into 4 matlab arrays?
Thank you

4 Comments

Any particular reason why you want to store them in 4 different arrays?
yes, these are measured data sets [x1 y1] and [x2 y2] from different sources with different sampling rates
also I chose 4 as an example. in realiy they might be in the hundrets
"in realiy they might be in the hundrets"
Noted.
And what do you want to do with the different arrays? Do you want to perform some kind of operation/data manipulation on the them? or something else?

Sign in to comment.

Answers (1)

readtable() to read all entries together. Then take one variable at a time and trim off trailing empty entries.
Or possibly multiple readtable() or readmatrix() calls with 'Range' parameter indicating which column to read.

Products

Release

R2022a

Asked:

on 11 Sep 2023

Commented:

on 11 Sep 2023

Community Treasure Hunt

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

Start Hunting!