# Is there a way for me to plot a 3D time dependent vector? [closed]

I wanted to know if it is possible for me to plot a 3D vector (with x, y, and z components) in which each component is dependent on time. For more context, I want to plot the function:

$$\qquad E(t) = 3\cos(ω\,t)(\hat x) + [3\cos(ω\,t)−4\sin(ω\,t)] (\hat y) − 6\cos(ω\,t−π/4)(\hat z)$$

Which is a phasor represented in the time domain. I believe that the best way is to keep time constant, and to plot the function at one instant in time, but I also have seen my professor make a graph that gradually changes a variable, n, by itself, or by sliding a bar. How do I do that, or is there a better way to plot this function? Also, this isn't a part of my homework, but I would like to make a graph to better understand what I am doing for my homework and how it looks plotted.

• Have a look at ParametricPlot3D and Manipulate. The combo of them should do basically what your professor did. – Henrik Schumacher Jan 20 at 23:32
• Welcome to Mathematica Stackexchange! Don't forget to upvote good answers (and other people's questions) using the triangle above the number next to the post, and use the checkmark to "accept" the answer to your question that you think best answers it. Take the introductory TOUR – Vitaliy Kaurov Jan 22 at 15:45

You really should learn some basics (at least syntax) and show some of your own effort.

f[w_][t_]:={3 Cos[w t], 3 Cos[w t]-4 Cos[w t], -6 Cos[w t - Pi/4]}

Manipulate[
Show[
ParametricPlot3D[f[t],{t,0,2Pi},
BoxRatios->1,
SphericalRegion->True],
Graphics3D[{Red, Thick,Arrow[{{0,0,0},f[s]}]}]],
{s,0,2 Pi}] 