How to access one variable with SelectedVariableNames ?

조회 수: 2 (최근 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 CenterFile Exchange에서 Spreadsheets에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by