11-22-2016 01:11 AM
Hi, I have a problem. I have to generate this signal witch I post, but I dont know how. Can anybody help me pls?
Using the following sample signal x ( t ) {\displaystyle x(t)} that is composed of a set of four sinusoidal waveforms joined together in sequence. Each waveform is only composed of one of four frequencies (10, 25, 50, 100 Hz). The definition of x ( t ) {\displaystyle x(t)} is:
x ( t ) = { cos ( 2 π 10 t ) 0 s ≤ t < 5 s cos ( 2 π 25 t ) 5 s ≤ t < 10 s cos ( 2 π 50 t ) 10 s ≤ t < 15 s cos ( 2 π 100 t ) 15 s ≤ t < 20 s {\displaystyle x(t)={\begin{cases}\cos(2\pi 10t)&0\,\mathrm {s} \leq t<5\,\mathrm {s} \\\cos(2\pi 25t)&5\,\mathrm {s} \leq t<10\,\mathrm {s} \\\cos(2\pi 50t)&10\,\mathrm {s} \leq t<15\,\mathrm {s} \\\cos(2\pi 100t)&15\,\mathrm {s} \leq t<20\,\mathrm {s} \\\end{cases}}}
11-22-2016 01:20 AM - edited 11-22-2016 01:21 AM
Hi num,
composed of a set of four sinusoidal waveforms joined together in sequence
You should do exactly this!
Create 4 waveforms using the same sample rate. Then simply append them…
What exactly is your problem? Where are you stuck?
We will not solve your homework by presenting ready-to-use solutions - please show your attempts first!
11-22-2016 06:14 AM
I stuk in numbers of samples ... I need to create samples form 5 to 10 on the graph ... but when a choose a constant number in samples number it start to count from zero ..
11-22-2016 06:20 AM - edited 11-22-2016 06:23 AM
Hi num,
you need to create 4 waveforms, each of them for a time range of 5s.
Once you got your 4 waveforms: append them to get a single waveform of 20s duration!
Example with just 2 waveforms:
I stuk in numbers of samples ..
What exactly is your problem?
Each waveform represents a duration of 5s: "number of samples := samplerate * 5s"…
11-23-2016 12:51 AM
Hi,
I really think we shouldn't do you homework instead of you but here could be the possible way how to do it more scalable. Basically you can generate and concatenate signal segment for each item in the Signal Definition array. Sample rate will be just another input parameter of your signal generator.
.. and the result can look like this:
Good luck!
Ondřej K.
NIEE AE