Page 1 of 1

In MATLAB You need to write code that realizes two different piecewise-continuous waveforms. Your better answer weighs i

Posted: Fri May 20, 2022 3:43 pm
by answerhappygod
In MATLAB
You need to write code that realizes two different
piecewise-continuous waveforms. Your better answer weighs in at 15
points and your not-so-good answer (if there is one) weighs in at
just 10 points. Sample waveforms (we’re not requiring plots) are
provided to give you an idea of what we are asking. 13. Given a
sinusoidal waveform described by the vector pair t, wvin, write the
code for the function clippit that returns a vector pair t, wvout.
The function is called by the code [t,wvout] = clippit(t, wvin,
percentage); where it’s understood that percentage is a scalar
integer with a value lying between 1 and 99. This latter value
indicates a percentage of the peak value at which the value of the
output waveform gets clipped. For all absolute values above this
percentage of the peak the waveform gets clipped to the percentage
value. Thus, if 40 is passed into percentage, all values of wvin
greater than 40% of this peak value get clipped to 40% of the peak.
In like manner, for the negative values, all such values more
negative than the 40% of the maximum peak negative value get
clipped to this 40% value. We’ve provided two plots that used a
30-volt peak-to-peak sinusoid at a frequency of 1 kHz as an input
waveform. The plots (don’t code them!) show the input waveform and
realized output waveform you’d get when percentage receives values
of 70 and of 50. (70 p.c. clip.pdf and 50 p.c. clip.pdf) 14. Refer
to the waveform labelled as PlotOfWv32.pdf as a guide to answer
this question. You are to write the code for the function make_wv
that returns a t, wv vector pair for a function with a time span of
1 msec where the value of wv • is equal to 0 for the first 0.3 msec
• linearly increases from 0 to 10 over the time interval from 0.3
msec to 0.4 msec. • stays at the value 10 for a duration of 0.2
msec • then linearly decreases from 10 to 0 over the time interval
from 0.6 msec to 0.7 msec • for the final 0.3 msec its value is
again equal to 0.