How to access one variable with SelectedVariableNames ?

6 ビュー (過去 30 日間)
Jimmy Neutron
Jimmy Neutron 2020 年 10 月 7 日
回答済み: Jimmy Neutron 2020 年 11 月 4 日
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 Center および File ExchangeSpreadsheets についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by