Hi Mikayel,
Thanks for replying. I am using the version 11.2 on Windows as I stated earlier. I have attached the video to the previous message also (named as My_vdo). The code is:
alvar = Flatten[ Import["C:\\Users\\Abir\\Documents\\code\\forplot.mat"]];
mx = Take[alvar, {1, Length[alvar]/4}];
my = Take[alvar, {Length[alvar]/4 + 1, Length[alvar]/2}];
mz = Take[alvar, {Length[alvar]/2 + 1, Length[alvar]/4 * 3}];
time = Take[alvar, {Length[alvar]/4* 3 + 1, Length[alvar]}];
mmm = Thread[{mx, my, mz}];
data = Thread[{time, mx, my, mz}];
space = data[[All, 2 ;; 4]];
Manipulate[
Graphics3D[
Dynamic@{{GrayLevel[.7], Line[space[[1 ;; t]]]}, {Red, Arrowheads[.07], Arrow[Tube[{{0, 0, 0}, space[[t]]}, 0.01]]}},
Axes -> True, AxesStyle -> Directive[FontSize -> 17, FontFamily -> "Helvetica"],
AxesLabel -> {"x", "y", "z"}, BoxRatios -> {1, 1, 1},
ImageSize -> 400, PlotRange -> 1, SphericalRegion -> True,
Boxed -> False, ViewPoint -> {0, -2, 1}],
Row[{Control[{t, 1, Length[data], 1, Animator, ImageSize -> Small,
AnimationRunning -> True, AnimationRepetitions -> 1,
AnimationRate -> 500}], Spacer[10],
Dynamic["second" data[[t, 1]]]}]
]
Export["test.mov", %]
This code takes a .mat file (forplot.mat) as input. The mat file is also attached. It has data for three axes and time.
I'll look forward to you or any other person's reply in this regard. I'll much appreciate that.
Best,
Abir
Attachments: