MATLAB for Analyzing and Visualizing Geospatial Data

조회 수: 4 (최근 30일)
Aris Setiawan
Aris Setiawan 2020년 11월 21일
댓글: Sarvani Panguluri 2020년 11월 25일
I am following Loren Shure's video presentation on MATLAB for Analyzing and Visualizing Geospatial Data. But I have error message on second section (Select a subset of information) on the following:
ds.SelectedVariableNames = {'x_Date','lat','lon','depth','q_1','mw','q_2','mo','mo_auth'};
with message:
Error using matlab.io.datastore....
SelectedVariableNames must be a unique subset of VariableNames
Thank you.

답변 (1개)

Sarvani Panguluri
Sarvani Panguluri 2020년 11월 24일
Hi,
Can you specify which version of MATLAB you are using?
  댓글 수: 2
Aris Setiawan
Aris Setiawan 2020년 11월 24일
Matlab 2020b
Sarvani Panguluri
Sarvani Panguluri 2020년 11월 25일
Hi,
I tried reproducing the issue and found that two of the possible reasons for the error could be, if the names in the SelectedVariableNames list does not exist in the main VariableNames.To find that,you can try
ds = datastore('isc-gem-cat.csv',"delimiter",",","NumHeaderLines",56)
ds.VariableNames
and check if the ds.VariableNames list has all these 'x_Date', 'lat', 'lon','depth','q_1','mw','q_2','mo','mo_auth' .
And unnecessary spaces before or after names (like , ' lat ',' lon ') could also lead to the error.Please Check if any of these is causing the error.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by