Tag Info

Hot answers tagged

7

Pure GammaDistribution does not seem at all like a good fit even visually. You need probably a MixtureDistribution. You could BTW skip NonlinearModelFit and start playing with FindDistributionParameters. But I think you are better of trying out latest WL function FindDistribution. In automated regime it finds almost what you need: dis = ...


4

The calculation of AIC for a particular model varies among software programs and yet none of those are necessarily wrong. The difference among software programs (that do it correctly) is because some leave off constants that don't vary with the data. What counts is that the difference of the AIC values between two different models in the same software ...


4

I guess what you are looking for can be easily achieved (and adjusted) with the RegionFunction option. Let me give an example using Plot3D. It should work similarly with ListPlot3D: Manipulate[ Plot3D[Sin[10 x + 0.1 y]^2*Exp[-(x^2 + y^2)], {x, -2, 2}, {y, -2, 2}, PlotRange -> {Automatic, Automatic, {0, 1}}, PlotPoints -> 25, RegionFunction ...


3

There is a problem with your initial velocity: Hmax = Vo^2*Sin[phi Degree]^2/(2*9.8) (*13.9274*) With that initial Velocity, you can only reach 13.9 meters (far from the 25+ from your data), and that's without drag. So you can't fit anything really. Maybe the velocity is not well measured. What you could do is fit Cdrag and Vo. Using part of Mariusz's ...


2

To generate data using the given equation, you can use different values for {a,b,c} to generate data. Here's a method using With where {a,b,c} are local variables: f[x_, y_, z_] := With[{a = 0.1, b = -3., c = 1.2}, a *x^2 *Exp[b *x + y^2] + c* z^2* y]; Then you need to build you dataset; You can use Table and Flatten to have your data in suitable format ...


2

This is what I understand you're asking: For your problem the data matrix has to be of the form {{x,y,z,f},{...},...}. I will create some data. data = MapThread[{#1[[1]], #1[[2]], #1[[3]], 0.34*(#1[[1]]^2)*Exp[-1.82*#1[[1]] + #1[[2]]^2] + 0.94*(#1[[3]]^2)*#1[[2]] + #2} &, {RandomReal[1, {100, 3}], RandomReal[{-0.01, .01}, ...


2

I rewrote quite a few things... manually specifying the mixture, and setting very low iteration and precision goals because it hangs for what seems like an eternity. Importantly I also specified assumptions on the distribution: sas[\[Mu]_, \[Sigma]_, skew_, kurt_, z_] := ((1 + ((z - \[Mu])/\[Sigma])^2)^(-(1/2)) kurt Cosh[ kurt ArcSinh[(z - ...


2

This may be useful.. sampledata = {#, Piecewise[ {{ 1 + # , # < 1} , { 6 (# - 1) + 2 , # > 1} }] (1 + RandomVariate[NormalDistribution[0, .2]])} & /@ RandomReal[{0, 2}, 50]; Manipulate[ fit = NonlinearModelFit[ sampledata , Piecewise[ {{ a + b x , x <= m } , { c (x - m) + a + b m ...


2

This is not really a Mathematica question, but here are some thoughts. I doubt you will be able to distinguish between a break in trend and a logarithmic trend. Take the log of the data and see if that has a linear trend instead. There are plenty of ways to test for and find a structural break. Have a look at some basic resources on this. The CUSUM test is ...


2

First let's take look at your version: pixelsize = 5.3; (flatimaData = Flatten[MapIndexed[{#2[[1]] pixelsize, #2[[2]] pixelsize, #1} &, imaData, {2}], 1];) // AbsoluteTiming (* 2.44 seconds *) Now I try it with Table instead of MapIndexed: dims = Dimensions@imaData; (flatimaData2 = Flatten[ Table[{i*pixelsize, j*pixelsize, ...


1

This worked for me. I hope it helps. I used ParametricNDSolveValue k1 = 20; k2 = 200; k3 = 0.03; tmax = 2000; ode = {S'[t] == -k1 Eu[t] S[t] + k2 ES[t], Eu'[t] == -k1 Eu[t] S[t] + k6 EP[t] + k2 ES[t], ES'[t] == k1 Eu[t] S[t] - (k2 + k3) ES[t], EP'[t] == k3 ES[t] - (k4 + k5 + k6) EP[t], Ec'[t] == k4 EP[t], P'[t] == k6 EP[t], S[0] == 100, ...


1

OK, I'm able to give an incomplete answer now.I can't fit but.. Values for all constants are correct? You must have made ​​a mistake somewhere. Cdrag = 0.13952; g = 9.80665; M = 0.04593; R = 0.04267/2; Vo = 48.54; \[Phi] = 19.9; \[Rho] = 1.2041; A = \[Pi] R^2; k = 1/2 \[Rho] A Cdrag; {xsol, ysol} = NDSolveValue[{x''[t] == -(k/M)*(x'[t])^2, y''[t] == ...


1

In the format you propose, the dependence of $f$ on $t$ is left implicit in your model. $a(t)$ and $b(t)$ seem to be some quadratic function of $t$, but as @jens_bo mentioned, you need to tell us or find out more about $a(t)$ and $b(t)$ to obtain a fit of $f$ as a function of $t$. Data format: Data needs to be presented to all fitting functions as a list of ...


1

Like this? data = {{0.1, 2}, {0.12, 3}, {0.15, 4.2}, {0.17, 5}}; line = Fit[data, {1, x}, x]; Show[Plot[line, {x, 0, 0.2}], ListPlot[data]]


1

Having a closed form for integral of an incomplete gamma function should be a big deal(!), but having a numerical approximation is simple. Define: f[k_,e_,limit_]:=NIntegrate[Gamma[k, 0, Exp[-2 e x^2]], {x, -limit, limit}]; For example: f[2,0.2,3] (* 0.591563 *) You can also see how f changes with k and e: Plot[{Legended[f[k, 0.2, 3.], "e=0.2"], ...


1

Here's how to interpret statistical significance, here illustrated for a $\chi^2$ distribution: Such a distribution tells you the expected probability of finding a value of $x$ as the sum of squares of values chosen from $n$ univariate Gaussian distributions (where we call $n$ the degrees of freedom). Of course, the value of $x$ can never be negative. The ...



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