New answers tagged

0

Reap[NDSolve[{y'[x] == y[x] Cos[x + y[x]], y[0] == 1}, y, {x, 0, 1}, StepMonitor :> Sow[{x, y[x]}]]][[2, 1]] // TableForm \!\( TagBox[GridBox[{ {"0.00009909606535016074`", "1.0000535319703938`"}, {"0.00019819213070032147`", "1.0001070540762556`"}, {"0.003581745354996745`", "1.0019287482920178`"}, {"0.006965298579293169`", "1.003738849393516`"}, {"0....


2

We can reduce the time by 100 times using Compile[] and ParallelTable[] cf = Compile[{{R, _Real}, {\[Phi], _Real}, {Z, _Real}}, (0. + 1/10 (5/R^6 + 5 R^4) Z (0. + 1.5 Cos[5 \[Phi]]) + ((30 R + 90 R^9 - 120 R^11)/(480 R^5) - (-14 + 15 R^2 + 9 R^10 - 10 R^12)/(96 R^6) + 1/4 (-(5/R^6) + 5 R^4) Z^2) (0. + 1.5 Sin[...


5

Finally... TableView arrives in version 12.1:


0

z[x_][y_] = x + y xrange = {0.1, 1, 0.05} yrange = {3000, 15000, 100} tab1 = Table[{x, y, z[x][y]}, {x, xrange}, {y, yrange}] ListContourPlot[Flatten[tab1, 1]]


5

As far as I have checked, the following should produce the same result within a couple of seconds. The most important point towards performance is to use NDSolveValue because that avoids all sorts of symbolic computations and replacements. Using a sparse matrix to set up the system is just convenient (if one has a bit of experience with that). v0 = 2 10^-5;...


3

Update: ClearAll[sA] sA = SparseArray[{Band[{1, 1}] -> #, Band[{1, 1 + Last@Dimensions[#[[1]]]}] -> #2}] &; Example: SeedRandom[1] k = 4; {rowdims, coldims} = RandomInteger[{2, 4}, {2, k}]; ClearAll[m1, m2, m3, m4, n1, n2, n3, ma, mb, mc, md, na, nb, nc]; ms = {m1, m2, m3, m4} = MapThread[Array[Function[{x, y}, Subscript[#, x, y]], #2] &, ...


2

Manipulate[Take[Eingabefeld4, Eisen], {{Eisen, 1}, InputField[]}, Dynamic@Panel[Column[{Style["Armierung", 12, Bold], Labeled[Grid[Table[With[{i = i, j = j}, InputField[Dynamic[Eingabefeld4[[i, j]]], ImageSize -> Tiny]], {i, Eisen}, {j, 3}]], {Row[{" X", "Y", "phi"}, Spacer[70]], "Eingabefeld4"}, {Top, Left}],...


Top 50 recent answers are included