MATLAB: Problem with optimset not being recognized, R2012a

optimset

I just loaded R2012a this morning and my old m-files are broken. I am having trouble with optimset, and just decided to put optimset in the m-file, as the help says "optimset" alone should return the options. Instead I get this error:
Undefined function or variable 'optimset'
which optimset
yields:
'optimset' not found
even though which lsqcurvefit yields: C:\Program Files\MATLAB\R2012a\toolbox\shared\optimlib\lsqcurvefit.m
Here is my output from ver: MATLAB Version: 7.14.0.739 (R2012a) MATLAB License Number: ####### [SCd Censor] Operating System: Microsoft Windows 7 Version 6.1 (Build 7601: Service Pack 1) Java Version: Java 1.6.0_17-b04 with Sun Microsystems Inc. Java HotSpotâ„¢ 64-Bit Server VM mixed mode ——————————————————————————————————-
MATLAB Version 7.14 (R2012a)
Simulink Version 7.9 (R2012a)
Bioinformatics Toolbox Version 4.1 (R2012a)
Control System Toolbox Version 9.3 (R2012a)
Curve Fitting Toolbox Version 3.2.1 (R2012a)
DSP System Toolbox Version 8.2 (R2012a)
Data Acquisition Toolbox Version 3.1 (R2012a)
Image Acquisition Toolbox Version 4.3 (R2012a)
Image Processing Toolbox Version 8.0 (R2012a)
Instrument Control Toolbox Version 3.1 (R2012a)
MATLAB Compiler Version 4.17 (R2012a)
MATLAB Report Generator Version 3.12 (R2012a)
Neural Network Toolbox Version 7.0.3 (R2012a)
Optimization Toolbox Version 6.2 (R2012a)
Parallel Computing Toolbox Version 6.0 (R2012a)
Partial Differential Equation Toolbox Version 1.0.20 (R2012a)
Signal Processing Toolbox Version 6.17 (R2012a)
SimBiology Version 4.1 (R2012a)
SimMechanics Version 4.0 (R2012a)
Simscape Version 3.7 (R2012a)
Spreadsheet Link EX Version 3.1.5 (R2012a)
Stateflow Version 7.9 (R2012a)
Statistics Toolbox Version 8.0 (R2012a)
Symbolic Math Toolbox Version 5.8 (R2012a)
Wavelet Toolbox Version 4.9
What happened to my install?
Thanks

Best Answer

I did a complete download and reinstall. After the reinstall, I located optimset in the path Arthur suggested above, as opposed to the one I found earlier in \funfun. But still no optimset. When I started matlab in told me that my Toolbox Path Cache was out of date. I reapplied the setting under general, and it started working.
Thanks Arthur for the help.
Related Question