How to plot this discrete waveform?

Thread Starter

loiloi84

Joined Sep 5, 2008
1
= Using matlab=

% duration pattern

d(1,1:5) = [5 0 30 0 5 ];

% magnitude patterns

m(1,1:5) = [1 1.2 1.2 1.0 1.0];

Hello , how can i plot this magnitude of [1 1.2 1.2 1.0 1.0] for the duration of [5 0 30 0 5 ]? Meaning the wave will remains at 1 for 5 cycles, 1.2 for 30 cycles and so on. Thanks in advanced
 

Dave

Joined Nov 17, 2003
6,969
Just to be clear, you want to plot:

- The magnitude of 1 for 5 cycles
- The magnitude of 1.2 for 0 cycles (redundant)
- The magnitude of 1.2 for 30 cycles
- The magnitude of 1 for 0 cycles (redundant)
- The magnitude of 1 for 5 cycles

?

Dave
 
Top