I want to demonstrate formation of circularly and elliptically polarised light with superimposing two waves with phose difference pi/4 (one wave should be in xz plane and other shold be in yz plane).
As demonstrated below:
here green and blue should be the two waves and red must be the output.
i wrote code of
For plotting 2 periods of the signalfs = 100000; %100KHz sampling frequency
f = 1000; %1KHz signal frequency
t = 0:1/fs:2*(1/f);x = sin(2*pi*f*t);y = sin(2*pi*f*t+pi/2);plot3(t,x)hold onplot3(t,y)hold onplot3(t,x,y)xlabel ("x");ylabel ("y");zlabel ("z");
output:
so here blue and red waves was supposed to be in xy and yz axis respectively but they are in same plane and the output wave is yellow in color.
I gues what I am plotting is not with vector diagram but just a scalar. so how to plot a vector?
also how will i get the resulted wave? with code
plot3(t,x,y)
or
plot3(t,x+y)?
what is the difference between both?
in theory it should be x+y
Best Answer