필터 지우기
필터 지우기

Check for incorrect argument data type or missing argument in call to function "minimize"

조회 수: 1 (최근 30일)
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.

답변 (1개)

Torsten
Torsten 2022년 5월 20일
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:

카테고리

Help CenterFile Exchange에서 Gaussian Process Regression에 대해 자세히 알아보기

제품


릴리스

R2022a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by