5
$\begingroup$

In the following X1 and X2 represent the Cartesian coordinates [random function of, say, time]. I can plot both as a function of time as shown, using ListLinePlot. I want to plot the trajectory, i.e. the position of the point [X1(t),X2(t)] in the plane, as a function of time [the results should be a stochastic spiral, I guess]

X1 = TransformedProcess[t*Cos[t + x[t]], {x \[Distributed] WienerProcess[]}, t];

X2 = TransformedProcess[t*Sin[t + y[t]], {y \[Distributed] WienerProcess[]}, t];

X1D = RandomFunction[X1, {0, 10, 0.01}, 3];
X2D = RandomFunction[X1, {0, 10, 0.01}, 3];

ListLinePlot[X1D, PlotRange -> All]
ListLinePlot[X2D, PlotRange -> All]

ListLinePlot[{X1D, X2D}, PlotRange -> All]
$\endgroup$
3
  • $\begingroup$ BTW, welcome to Mathematica.SE! I suggest the following: 1) Take the tour and check the faqs. 2) When you see good questions and answers, vote them up by clicking the gray triangles, because the credibility of the system is based on the reputation gained by users sharing their knowledge. Also, please remember to accept the answer, if any, that solves your problem, by clicking the checkmark sign! 3) As you receive help, try to give it too, by answering questions in your area of expertise. $\endgroup$
    – Chris K
    Commented Apr 10, 2020 at 17:45
  • $\begingroup$ sorry mate: what do you mean by checkmark sign? $\endgroup$ Commented Apr 10, 2020 at 17:52
  • $\begingroup$ It's under the gray up/down arrows next to an answer $\endgroup$
    – Chris K
    Commented Apr 10, 2020 at 17:56

1 Answer 1

6
$\begingroup$

You could simulate the two processes together, then extract the values of the resulting TemporalData with the property "ValueList":

X12 = TransformedProcess[{t*Cos[t + x[t]], t*Sin[t + y[t]]},
  {x \[Distributed] WienerProcess[], y \[Distributed] WienerProcess[]}, t];
X12D = RandomFunction[X12, {0, 10, 0.01}, 3];

ListLinePlot[X12D["ValueList"], PlotRange -> All]

Mathematica graphics

Edit:

In response to OP's comment below, here's a version where the two variables experience the same noise:

X12 = TransformedProcess[{t*Cos[t + x[t]], t*Sin[t + x[t]]}, 
   x \[Distributed] WienerProcess[], t];
X12D = RandomFunction[X12, {0, 10, 0.01}, 3];

ListLinePlot[X12D["ValueList"], PlotRange -> All]

Mathematica graphics

Looks cool!

$\endgroup$
1
  • $\begingroup$ Great! Thanks. I realized that it was not quite what I wanted to do. So if you are interested by what a stochastic spiral looks like take x[t]=y[t] (THE SAME WIENER PROCESS]. That is what I had in mind. Just plotted it (as you suggested): looks great- you can have a look if interested. Thanks! $\endgroup$ Commented Apr 10, 2020 at 17:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.