Tag Info

New answers tagged

8

You may use NMinimize[] on the results of ParametricNDSolve[] like this: g = 9.81; m = 10; rho = 1.225; Cd = 0.5; A = 0.1; rcd = rho Cd A; vMax = 40; EndTime[theta_] := (2 vMax Sin[theta])/g + 5; sol[Ux_, Uy_, Uz_] := Quiet@ParametricNDSolve[{ m z''[t] == -m g - Tanh[z'[t]] 1/2 rcd (z'[t] - Uz)^2, z[0] == 0, z'[0] == v Cos[theta], m ...


5

Finding parameter starting estimates is an important starting point. I post this for illustration. There are many ways to approximate. Manipulate[ Show[ListPlot[data], Plot[s Exp[- a t] Sin[ b t + c] + f, {t, 0, 1000}]], {a, 0, 0.1}, {b, 0.001, 0.01}, {c, 1, 10}, {s, 20, 50}, {f, 5, 50}] Now fit model: nlm = NonlinearModelFit[data, amp Exp[- ...


2

You can replace the boundary Line with a Polygon: heart = (2 x^3 + y^2 + z^2 - 1)^3 - (1/10) x^2 z^3 - y^2 z^3; g = Show[ ContourPlot3D[heart == 0, {x, 0., 1.5}, {y, -1.5, 1.5}, {z, -1.5, 1.5}, Mesh -> None, PlotPoints -> 40, ContourStyle -> Opacity[0.8, Red], AxesLabel -> Automatic] /. Line[p_] :> {Opacity[0.8, Red], ...


5

You can also use RegionPlot3D: RegionPlot3D[ reg = (2 x^3 + y^2 + z^2 - 1)^3 - (1/10) x^2 z^3 - y^2 z^3 <= 0 && x >= 0, {x, -2, 2}, {y, -2, 2}, {z, -2, 2}, Mesh -> None, Boxed -> False, Axes -> None, PlotPoints -> 40, PlotStyle -> Red, Background -> Black] Implicit regions could be refined but is not as pleasing ...


3

Will this help you? c1 = ContourPlot3D[{heart == 0}, {x, -1.5, 1.5}, {y, -1.5, 1.5}, {z, -1.5, 1.5}, Mesh -> None, ContourStyle -> Opacity[0.8, Red], RegionFunction -> Function[{x, y, z}, x > -0.3]]; c2 = ContourPlot3D[x == -.3, {x, -1.5, 1.5}, {y, -1.5, 1.5}, {z, -1.5, 1.5}, Mesh -> None, ContourStyle -> Opacity[0.8, Blue], ...



Top 50 recent answers are included