Tag Info

New answers tagged

0

An alternative solution would be changing the myfun14[list_] to myfun14[list_ /; VectorQ[list, NumberQ]], the result can be obtained after a few seconds. Setting a high AccuracyGoal is also necessary to get the correct answer for the problem.


3

Changing B*list to B.list seems to solve the problem. Also, I recommend dropping unnecessary decimal points from myfun14. Doing so gives (* {x[1] -> 0.5, x[2] -> 0.273438, x[3] -> 0.0128174, x[4] -> 0.125601, x[5] -> 0.00588754, x[6] -> 0.000275978, x[7] -> 0.0000129365, x[8] -> 0.0625006, x[9] -> 0.00292972, x[10] ...


1

Runge-Kutta Formula Implementation Options[RKSolve] = {Method -> Automatic, WorkingPrecision -> MachinePrecision}; RKSolve::badmeth = "`1` is not a valid value of option `2`"; RKSolve[func_, {a_, b_, h_: .1}, ya_, opts : OptionsPattern[]] := Module[{num, method, subfn, order}, method = Method /. {opts} /. Options[RKSolve]; If[ ! ...


2

Here's a minimally-changed working version of what you want, I think: Do[ Do[ If[ (Subscript[B, i][[j]] == {20} && Subscript[B, i][[j + 1]] == {10}) || (Subscript[B, i][[j]] == {10} && Subscript[B, i][[j + 1]] == {20}) , Subscript[new, i] = Module[ {a = Subscript[B, i]} , ReplacePart[a, {j -> a[[j + ...



Top 50 recent answers are included