Closed pjcosta104 closed 2 years ago
@pjcosta104 It looks like a version problem. Which version of optimization tool and MATLAB are you using? The code is fine in all my machines with MATLAB higher than r2018a.
Or maybe you can try to comment out 'PlotFcns',[]
in optimoptions function
If I try to execute the following MATLAB commands (MAT files are included for your convenience)
load(fullfile(Sdir,'target_responses.mat')); load(fullfile(Sdir,'camera_responses.mat')); [Mcor, scale, predicted_responses, errs_train] = ccmtrain(Target,Reference,'loss','ciede00','bias',false,'targetcolorspace','sRGB','preservewhite',true);
% then I receive the following errors
Error using parseParameterInputsML>findParm (line 166) Unrecognized parameter name: 'PlotFcns'.
Error in parseParameterInputsML (line 44) pidx = findParm(args{k},parms, ...
Error in parseParameterInputsML (line 14) pstruct = parseParameterInputsML(fieldnames(parms),options,args);
Error in coder.internal.parseParameterInputs (line 86) pstruct = parseParameterInputsML(parms,options,varargin);
Error in optimoptions
Error in ccmtrain (line 207) options = optimoptions(@fmincon,...
% If I then remove line 212 if ccmtrain.m, the following error occurs
Unrecognized function or variable 'eml_option'.
Error in optim.coder.validate.checkProducts
Error in fmincon
Error in ccmtrain (line 219) matrix = fmincon(costfun, matrix0(:), [], [], Aeq, beq, [], [], [], options);
% How does one circumvent these errors?
Thank you in advance and sincerely,
Dr. Peter Costa
% P.S. I could not upload the MAT files I wanted to include. Here they are in raw form
Target Target =
Reference Reference =