I am trying to simulate Jiles Atherton model with my experimental data,but I am not able to combine the simulated one with experimental one. I am getting the error "could not combine the graphics objects in show"
Below is the code used .Really appreciate any assistance
dataInput = Import["C:\\Users\\Lenovo\\Desktop\\JA.TEST.DAT"];
data = dataInput[[All, {1, 2}]]
p2 = ListLinePlot[data, PlotStyle -> Blue,
PlotRange -> {{-7000, 7000}, {-1, 1}}]
\[Mu]0 = 4 \[Pi] 10^-7;
\[Omega] = 2 \[Pi] (1);
Man[t_] :=
Ms (Coth[(H[t] + \[Alpha] M[t])/a] - a/(H[t] + \[Alpha] M[t]))
\[Delta]M[t_] =
1 - UnitStep[-H'[t]] UnitStep[Man[t] - M[t]] -
UnitStep[H'[t]] UnitStep[M[t] - Man[t]];
H[t_] := 7000 Sin[\[Omega] t]
\[Delta][t_] := Sign[H'[t]]
solns = ParametricNDSolveValue[{Block[{Ms, c, a, k, \[Alpha]},
M'[t] == (\[Delta]M[t] (Man[t] - M[t]) H'[t] +
c k \[Delta][t] Man'[t])/(k \[Delta][t] - \[Alpha] \[Delta]M[
t] (Man[t] - M[t]))], M[10^-3] == 0},
M, {t, 0, 5}, {Ms, c, a, k, \[Alpha]},
Method -> {"EquationSimplification" -> "Residual"}];
p1 = Manipulate[
ParametricPlot[{H[t], 10^-6 solns[Ms, c, a, k, \[Alpha]][t]}, {t, 0,
1.3}, AxesLabel -> {Row[{Style["H", Italic], " (A/m)"}],
Row[{Style["B", Italic], " (T)"}]}, LabelStyle -> {15},
PlotRange -> {{-7000, 7000}, {-1, 1}}, PlotStyle -> Black,
AspectRatio -> 1, ImageSize -> 1.125 {400, 400}],
Row[{"saturation magnetization ",
Subscript[Style["M", Italic], "s"], " (A/m)"}],
{{Ms, 1. 10^6, "" }, 0.5 10^6, 1.1 10^6, Appearance -> "Labeled",
ImageSize -> Tiny}, "",
Row[{"magnetization reversibility ", Style["c", Italic]}],
{{c, 1/5.5, ""}, 1/30, 1, Appearance -> "Labeled",
ImageSize -> Tiny}, "",
Row[{"domain wall density ", Style["a", Italic], " (A/m)"}],
{{a, 1800, ""}, 1000, 2300, Appearance -> "Labeled",
ImageSize -> Tiny}, "",
Row[{"average energy to \nbreak pinning site ", Style["k", Italic],
" (A/m)"}],
{{k, 2000, ""}, 1000, 2500, Appearance -> "Labeled",
ImageSize -> Tiny}, "",
"interdomain coupling \[Alpha] ",
{{\[Alpha], 2.1 10^-3, ""}, 1.1 10^-3, 5.1 10^-3,
Appearance -> "Labeled", ImageSize -> Tiny},
ContinuousAction -> False, SaveDefinitions -> True,
ControlPlacement -> Left]
Manipulate[Show[p1, p2], PlotRange -> Automatic]
Manipulate[Show[p1, p2], PlotRange -> Automatic]
does not conform to a Manipulate. It specifies no controls.PlotRange -> Automatic
is not a option forManipulate
. Not clear what you want to do. $\endgroup$