MATLAB: Every model built in Matlab or Simulink R2018a and earlier with MPC Blocks is failing in R2018b with ‘too many output arguments’. Has any one else seen this & solved it please

Model Predictive Control Toolboxmpcoutput argumentstoo many

I have recently updated from R2018a to R2018b. All the models I try to run in Simulink with any MPC Block or MPC controllers configured in Matlab fail with the error 'too many output arguments'. I have looked for shadowing and duplicated variable names etc and eliminated them but with no success.
So I opened a Mathworks example to see if that caused a similar issue. The first one I opened is 'Control of a Multi-Input Single-Output Plant' using the 'Open Script' button. I then ran the m file 'mpcmiso.m'. In this case the MPC controller configured in Matlab – the error I got mirrors that I have been getting with my own models:
>> mpcmiso
–>The "Weights.ManipulatedVariables" property of "mpc" object is empty. Assuming default 0.00000. –>The "Weights.ManipulatedVariablesRate" property of "mpc" object is empty. Assuming default 0.10000. –>The "Weights.OutputVariables" property of "mpc" object is empty. Assuming default 1.00000. Assuming no disturbance added to measured output channel #1.
Error using mpc/getStruct (line 304) Too many output arguments.
Error in mpc/sim (line 49) [MPCstruct, need_to_update, MPCobj] = getStruct(MPCobj);
Error in mpcmiso (line 44) sim(mpcobj,Tf,r,v)
If I used which to try and see if there is any shadowing issue I only get: >> which mpcobj -all mpcobj is a variable.
I have also tested 'ControlOfAnInvertedPendulumOnACartExample' from the example 'Control of an Inverted Pendulum on a Cart' which includes a Simulink MPC Controller Block and get the same error:
>> ControlOfAnInvertedPendulumOnACartExample
ans =
0
-11.9115
-3.2138
5.1253
–>The "Weights.ManipulatedVariables" property of "mpc" object is empty. Assuming default 0.00000. –>The "Weights.ManipulatedVariablesRate" property of "mpc" object is empty. Assuming default 0.10000. –>The "Weights.OutputVariables" property of "mpc" object is empty. Assuming default 1.00000. for output(s) y1 and zero weight for output(s) y2 –>Converting model to discrete time. –>The "Model.Disturbance" property of "mpc" object is empty: Assuming unmeasured input disturbance #1 is integrated white noise. Assuming no disturbance added to measured output channel #1. –>Assuming output disturbance added to measured output channel #2 is integrated white noise.
Error using mpc/getindist (line 43)
Too many output arguments.
Error in ControlOfAnInvertedPendulumOnACartExample (line 170) disturbance_model = getindist(mpcobj);
>> If I used which to try and see if there is any shadowing issue I only get:
>> which mdlMPC -all
mdlMPC is a variable.
Can any one help me stop this 'too many output arguments' error happening so that the models run please?

Best Answer

I can answer my own question - the only issue is I do not know why it worked.
I completely uninstalled Matlab / Simulink from my computer including all command history etc & deactivated the install; deleted any files left in R2018b & rebooted. Then downloaded the .exe file anew; and re-installed; activating the install as per normal once the software had completed installing. Now the examples & my own models work again.
I do not need any more help for this particluar issue thank you.