How to add two rows end to end to make a longer row?
Mostrar comentarios más antiguos
I am trying to create a signal where
00 state is represented by 4 sine waves, I want to create 00 01 10 11 signal train which sine wave has 2 ghz so a perios is 5 ns and total lengh is going to be 100 ns with 4 period of no signal at the end of 00 01 10 11.
01 is represented with no signal for a single period and 3 sine waves
10 is represented 2 period of no signal and 2 sines after
11 is 3 period of no signal and 1 sine after
so what I come up with adding sine wave and 0 matrices end to end to create 00 01 10 11 signal
The code I wrote to check if it is working is only for two bits at the start 00 and 01.
f=2e9; %frequency [Hz]
t=(0:1/(f*100):4e-9); %total time
t1=(0:1/(f*100):2e-9); %first continious sine wave
tgap1=(2e-9:1/(f*100):2.5e-9); %first period of 0 at the start of 01
t2=(2.5e-9:1/(f*100):4e-9); %rest of the 01 bit
a=1; %amplitude [V]
phi=0; %phase
wf1=a*sin(2*pi*f*t1+phi);
wf2=0*sin(2*pi*f*tgap1+phi);
wf3=a*sin(2*pi*f*t2+phi);
From here I don"t know how to add wf1 wf2 and wf3 end to end to create 1x801 double array that maches length of time array t which is 1x801 double.
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Applications en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!