Tag Info

Hot answers tagged

6

Flatten[#["BestFitParameters"][[All, 2]] & /@ {data1Fit, data2Fit, data3Fit}] or {HalfLife1, HalfLife2, HalfLife3 } /. Flatten[ #["BestFitParameters"] &/@ {data1Fit, data2Fit, data3Fit}]


5

I am not sure what the exact aim is and time does not permit refining some loose ends. Assuming reason to believe data is ellipsoid (as test data is): Using test data from another answer: data = Flatten[ Table[{RandomReal[{1.9, 2.1}] Cos[n/100 2 Pi] Sin[m/100 Pi], RandomReal[{0.9, 1.1}] Sin[n/100 2 Pi] Sin[m/100 Pi], RandomReal[{0.9, 1.1}] ...


5

This is not very Mathematica style, but it will do the job. We start with a trial data set which is confined in an ellipsoid data = Flatten[ Table[ {RandomReal[{1.9, 2.1}] Cos[n/100 2 Pi] Sin[m/100 Pi], RandomReal[{0.9, 1.1}] Sin[n/100 2 Pi] Sin[m/100 Pi], RandomReal[{0.9, 1.1}] Cos[m/100 Pi]}, {m, 100}, {n, 100}], 1]; ...


3

I just wanted to point out that all the routes above will work if there is only one differential equation: data = NDSolveValue[{ x''[t] - k1*(1 - x[t]^2)*x'[t] + k2*x[t] == 0, x[0] == 2, x'[0] == 0} /. {k1 -> 1., k2 -> 1.}, Table[{t, x[t] + RandomReal[{-.3, .3}]}, {t, 0, 10, .2}], {t, 10}]; dataT = data\[Transpose]; ti = dataT[[1, ...


3

It is a bug in the caching feature. Some distributions don't have p-value corrections since those based on the empirical CDF must be derived individually. The result is correct but the p-value is inflated due to lack of correction. When the test or any underlying one is ran again it returns the cached result with no message.


2

Since there's no data source in OP, can't work with it, but I believe your issue boils down to incorrect use of Check: It does not short-ciruit remaining parts of the compound expression, so you'll still get to the Append within even when a message was generated. You need to do the desired append outside of the check, e.g.: res = {}; Do[AppendTo[res, ...


2

Define this function: f[k1_?NumericQ, k2_?NumericQ, k3_?NumericQ] := Sum[Total[(ci[[i, All]] - Map[pfun[k1, k2, k3][[i]], ti])^2], {i, 1, 3}] // Quiet Then, fit = NMinimize[f[k1, k2, k3], {k1, k2, k3}]; params = fit // Last (*{k1 -> 0.000194805, k2 -> 0.0291469, k3 -> 0.109229}*) Plot it, Table[Show[ ListPlot[Transpose[{ti, ci[[i]]}]], ...


1

Here's sample data: testdata = {{2, 0, 0}, {-2, 0, 0}, {0, 1, 0}, {0, -1, 0}, {0, 0, 5}, {0, 0, -5}, {1, 1, 4}, {2, 4, -3}}; Here's the covariance matrix: myCov = Covariance[testdata]; Here's the solution (z value) for a best-fit ellipse: mysols = Solve[{x, y, z}.Transpose[myCov].myCov.{x, y, z} == 5, z] {{z -> (17119 x + 51177 y - 8 ...


1

This is not an answer, but rather one route to explore the feasibility of your model. Once you have the set of equations obtained from ParametricNDSolve you can plot them using Manipulate to see how the values of k affect the shape of the concentration vs. time plots: This graphic was obtained using the following (data contains the Imported google ...



Only top voted, non community-wiki answers of a minimum length are eligible