MATLAB for Analyzing and Visualizing Geospatial Data

1 view (last 30 days)
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
SelectedVariableNames must be a unique subset of VariableNames
Thank you.

Answers (1)

Sarvani Panguluri
Sarvani Panguluri on 24 Nov 2020
Can you specify which version of MATLAB you are using?
Sarvani Panguluri
Sarvani Panguluri on 25 Nov 2020
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)
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.

Sign in to comment.


Find more on Cartesian Coordinate System Conversion in Help Center and File Exchange



Community Treasure Hunt

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

Start Hunting!