Fit using curry matrix error
Posted: Fri Aug 18, 2017 12:36 am
Hello everyone,
when trying to fit Magnetisation over B-Field data with the esfit 'curr' function without scaling I receive an error message I do not really understand. It says some matrices do not have the right dimension, but I do not know how to fix this error:
"Error using vertcat
Dimensions of matrices being concatenated are not consistent.
Error in esfit
Error in esfit_simplex
Error in esfit
Error while evaluating UIControl Callback."
My code is the following:
Sys.g = [1.99, 1.99];
Sys.S = [1, 1];
Sys.J = -27504;
Dvar = -4760;
Sys.D = [Dvar Dvar];
[Bexp_raw, Mexp_raw] = textread('mydata.txt', '%f %f'); %imported in Oersted und Bohrmagneton
Bexp = Bexp_raw * 0.1; %Oersted to mT
Vary.D = [10000, 10000];
Vary.J = 10000;
Exp.CrystalOrientation = [];
Exp.Temperature = 2;
Exp.Field = Bexp(1:end);
SimOpt = [];
FitOpt.OutArg = [1 1];
esfit('curry', Mexp_raw(1:end), Sys, Vary, Exp, SimOpt, FitOpt);
However, fitting with scaling does not produce the error above, so it probably also has something to do with the choice of no scaling.... hopefully someone of you knows this error and can provide help. I would be very thankful!
when trying to fit Magnetisation over B-Field data with the esfit 'curr' function without scaling I receive an error message I do not really understand. It says some matrices do not have the right dimension, but I do not know how to fix this error:
"Error using vertcat
Dimensions of matrices being concatenated are not consistent.
Error in esfit
Error in esfit_simplex
Error in esfit
Error while evaluating UIControl Callback."
My code is the following:
Sys.g = [1.99, 1.99];
Sys.S = [1, 1];
Sys.J = -27504;
Dvar = -4760;
Sys.D = [Dvar Dvar];
[Bexp_raw, Mexp_raw] = textread('mydata.txt', '%f %f'); %imported in Oersted und Bohrmagneton
Bexp = Bexp_raw * 0.1; %Oersted to mT
Vary.D = [10000, 10000];
Vary.J = 10000;
Exp.CrystalOrientation = [];
Exp.Temperature = 2;
Exp.Field = Bexp(1:end);
SimOpt = [];
FitOpt.OutArg = [1 1];
esfit('curry', Mexp_raw(1:end), Sys, Vary, Exp, SimOpt, FitOpt);
However, fitting with scaling does not produce the error above, so it probably also has something to do with the choice of no scaling.... hopefully someone of you knows this error and can provide help. I would be very thankful!