How can I use the excel import functionality in Matlab to import a table but to have the individual pices of data in the table rows to not be imported as 1x1 tables as well?
Show older comments
When I import excel spreadsheets as tables it imports each piece of data as a 1x1 table which creates problems when I want to operate on those variables. For example, I cannot create new variables that are the squares and cubes of existing variables when each piece of data is a 1x1 table. What is the best way to handle this? Can I have the excel import function import the excel sheet as a table but have it cast each piece of data as a double?
Accepted Answer
More Answers (1)
Ameer Hamza
on 23 Apr 2018
Although you can change the entries in a MATLAB table. But for your case, you can convert your table into a double matrix as
myMatrix = cell2mat(myTable{:});
Then you can do the required calculations.
Categories
Find more on Tables 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!