transmit a Excel file in a vector or matrix
3 views (last 30 days)
Show older comments
Hi,
i'm searching for information to transmit a Excel file in a vector or matrix.
Thanks
Answers (1)
BN
on 21 Jan 2020
Edited: BN
on 21 Jan 2020
I think you want to import an excel file into Matlab.
You can use xlsread if your excel format is .xls
myfile = xlsread('filename.xlsx') %or xls (it depends on format of your excel file)
or csvread if your excel file is .csv
myfile = csvread('filename.csv')
Alternatively, I recommend you to import your excel file using one of these commands:
myfile = readtable('filename.xlsx') %or filename.csv or filename.xls
you can read your excel file as a matrix:
A = readmatrix('filename.xlsx')
Or even read it as cell structure:
C = readcell('filename.xlsx')
once data is read into the workspace using any of the above-mentioned commands, you can do whatever you want.
0 Comments
See Also
Categories
Find more on Spreadsheets in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!