JeschkeLab / DeerLab-Matlab

Data analysis and method development toolbox for dipolar EPR spectroscopy
MIT License
4 stars 2 forks source link

Misleading error message when Optimization Toolbox is not installed #1

Closed spribitzer closed 4 years ago

spribitzer commented 5 years ago

I tried to follow the "Analyzing Datasets" example in the tutorial section, but whenever I ran

[B,lam] = fitbackground(V,t,@td_exp);

I received the following error message:

Invalid solver specified. Provide a solver name or handle (such as
'fmincon' or @fminunc).

After some digging around it turned out, that I did not have the Optimization Toolbox installed. However, the error message insinuated that I had not set the paths correctly.

Suggestion: Test for availability of Optimization Toolbox with

license('test','optimization_toolbox')

which returns 1 if the toolbox is installed.

luisfabib commented 4 years ago

The program controls the license of the toolbox at the dependent functions and prompts an explanatory error if the toolbox is missing.