How to access one variable with SelectedVariableNames ?

4 次查看(过去 30 天)
I have a spreadsheet called 'dates.xlsx':
myData = spreadsheetDatastore('dates.xlsx');
myData.SelectedVariableNames = {'Birth', 'BirthYear'};
I want to access solely the 'Birth' specifically. Is there a universal way to do this or not? I do not want to write myData(1:end) to access the 'Birth', but I cannot find a better way to do this... Are there any other ways?

采纳的回答

Jimmy Neutron
Jimmy Neutron 2020-11-4
It is fairly simple, all you have to do is:
myData.('Birth')

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Data Import and Export 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by