Check for incorrect argument data type or missing argument in call to function "minimize"
9 views (last 30 days)
I have recently updated my Matlab fron 2019b to 2022a. I have problem when I use Gaussian Process toolbox (see here: Link). I did not have problem using old version of Matlab. Let consider this simple example:
x = gpml_randn(0.8, 20, 1); % 20 training inputs
y = sin(3*x) + 0.1*gpml_randn(0.9, 20, 1); % 20 noisy training targets
xs = linspace(-3, 3, 61)'; % 61 test inputs
meanfunc = ; % empty: don't use a mean function
covfunc = @covSEiso; % Squared Exponental covariance function
likfunc = @likGauss; % Gaussian likelihood
hyp = struct('mean', , 'cov', [0 0], 'lik', -1);
hyp2 = minimize(hyp, @gp, -100, @infGaussLik, meanfunc, covfunc, likfunc, x, y);
When I run this code, it shows the error message:
Check for incorrect argument data type or missing argument in call to function 'minimize'.
I do not know why the new version of Matlab returns this error. Can anyone tell me what is wrong with this code?
The minimize function: EDIT: Copyright code removed.
Torsten on 20 May 2022
There is no valid call to "minimize" with 9 arguments as you do above.
The first argument must be a function handle - it's not the case in your call above.
I guess you are talking about the "minimize" function from the file exchange here: