Suppose I have three differential equations systems, each one of them has 4 equations. I find the 4 solutions of each one, let's call them x,y,z,w. Now, I want to take $x_1$,$x_2$,$x_3$ and put them in an array so I can plot it by letting t vary. This array would be: $$ \alpha(t) = \{x_1(t),x_2(t),x_3(t)\} $$ Then I also want to take $y_i$,$z_i$ and $w_i$ to to the same. If you are curious $\alpha$ would be my curve and then the other is the Frenet tried.
However I am struggling to to this, for alpha I would do this in Mathematica:
alpha[t_] := {x[t] /. Part[solution1[[1]], 1],
y[t] /. Part[solution2[[1]], 1],
z[t] /. Part[solution3[[1]], 1]}
However It doesn't seem to work, because I then try to plot Alpha like this:
ParametricPlot3D[Evaluate[alpha[t]], {t, 0, 6}]
But I get an empty cube.
Solution is given from the NDSolve. The code Part[solution1[[1]],1]
is mean to take the array of solutions, and then the first one because that would be x.
I also tried to do: x[t] /. solution[[1]]
etc etc, that seemed too work just fine for $\alpha$, but then failed for the other things because it keeps saying that the solution[2], solution[[3]] and solution[[4]] do not exist (even though I have those).
Do you see what did I do wrong?
EDIT: Added picture of form of solution1
Where v[t],k1[t], k2[t] are given functions of t.
ParametricPlot3D[Evaluate[Through[alpha[t]]], {t, 0, 6}]
work? $\endgroup$solution1
,...? To figure out what's with someone else's code often requires the complete code. $\endgroup$Part
and usex[t] /. solution1[[1]]
, etc.? Alternatively, change they
component toy[t] /. Part[solution2[[1]], 2]
or equivalently,y[t] /. solution2[[1, 2]]
; similarly forz
. $\endgroup$