Filter löschen
Filter löschen

How to access one variable with SelectedVariableNames ?

4 Ansichten (letzte 30 Tage)
Jimmy Neutron
Jimmy Neutron am 7 Okt. 2020
Beantwortet: Jimmy Neutron am 4 Nov. 2020
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?

Akzeptierte Antwort

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

Weitere Antworten (0)

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by