MATLAB Answers

How can I extract column names from xls sheet and make them workspace variables?

2 views (last 30 days)
Hi, I have imported an excel spreadsheet to Matlab titled "Mockdata". There are two columns within this spreadsheet, "Time" and "Depth". The table called "Mockdata" is the only variable in my workspace; Time and Depth are not currently variables. I can plot the table by saying plot(Mockdata.Time, Mockdata.Depth), but how do I save Time and Depth as their own variables in the workspace, so I can simply plot (Time, Depth)? Thanks.

  0 Comments

Sign in to comment.

More Answers (0)

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!