the setupm file does not exist or is unreadable in matlab

When you see <...> brackets in a value definition or example like that, it generally means “replace this with the actual value appropriate for your environment”, instead of using literal <...> brackets in the value. So instead of this:

setenv('DIR_MODELS_REF_DAT', '</Users/username/Downloads/package/dat/iri2016>')

You should use something like this:

setenv('DIR_MODELS_REF_DAT', '/Users/username/Downloads/package/dat/iri2016')

And you should replace that “username” with your actual username; e.g. if your username is “jamie”, it should be:

setenv('DIR_MODELS_REF_DAT', '/Users/jamie/Downloads/package/dat/iri2016')

A nicer way to do this is to just query your home directory using getenv:

setenv('DIR_MODELS_REF_DAT', [getenv('HOME') '/Downloads/package/dat/iri2016'])

That way you don’t have to modify the code when it’s run as a different user.

Can you tell us exactly what Matlab package you’re using here?

CLICK HERE to find out more related problems solutions.

Leave a Comment

Your email address will not be published.

Scroll to Top