Question

Implement the function "triangl.m": function y=triangl(t) y = (1-abs(t)).*(t>=-1).*(t<1); end a) Plot time versus baseband signal...

Implement the function "triangl.m":

function y=triangl(t)
y = (1-abs(t)).*(t>=-1).*(t<1);
end

a) Plot time versus baseband signal (m_sig)

b) Plot freq versus baseband signal spectrum (M_fre)

I've created and saved the function "triangle.m", however, I'm unsure how to implement it for parts a) and b) in MATLAB.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

MATLAB CODE:

t=-2:0.01:2;
m_sig=triangl(t);
figure(1);
plot(t,m_sig)
xlim([-4 4])
ylim([0 1.5])
xlabel('time','Fontweight','bold');
ylabel('signal','Fontweight','bold');

fs=100; %sampling frequency=fs>2*fmax
y=fft(m_sig);
n=length(m_sig);
f=(0:n-1)*(fs/n);
power = abs(y).^2/n;
figure(2);
plot(f,power);
xlim([-10 150])
ylim([0 30])
xlabel('frequency','Fontweight','bold');
ylabel('spectrum','Fontweight','bold');

function y=triangl(t)
y = (1-abs(t)).*(t>=-1).*(t<1);
end


Add a comment
Know the answer?
Add Answer to:
Implement the function "triangl.m": function y=triangl(t) y = (1-abs(t)).*(t>=-1).*(t<1); end a) Plot time versus baseband signal...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • 1. Given a baseband signal m(t) sin(1000mt) cos(3000nt) + cos(3700nt a. Sketch the spectrum of m(...

    1. Given a baseband signal m(t) sin(1000mt) cos(3000nt) + cos(3700nt a. Sketch the spectrum of m(t) (Hint. sin(a) cos(b) 0.5 sin(a +b) +0.5sin a-b)) b. Sketch the spectrum of DSB-CS signal m(t)cos(10000mt) C ldentify the upper sideband {USB) and lower sideband (LSB) spectra d. Give the black diagram of the receiver to receive DSB-CS signal in (b). 2. baseband signal m(r)--0.5 + Σ..小(t-n)-u(t-0.5-n)] where ult) is the Given unit step function, an amplitude modulated signal is as SAM 107+ m(0cos...

  • Now use MATLAB to generate and plot 15seconds of this signal in the time-domain.Use the fft()...

    Now use MATLAB to generate and plot 15seconds of this signal in the time-domain.Use the fft() function to find the fourier transform of this signal and plot its magnitude spectrum School of Engineering Task 3 - The Fourier Transform: Scaling property Exercise: Let's take a look now at using the Fourier transform on aperiodic signals. Consider the real exponential signal from the discharging capacitor in tas 3 of laboratory 1 which was found to be: You(t)=e"u(t) Begin by calculating manually...

  • (B) Implement Matlab code for each part as described below: i) Define the following signal in tim...

    Using MATLAB, Please read carefully, EXPLAIN CODE AND ANSWERS, DISCUSS RESULTS, I NEED EVERY PART (B) Implement Matlab code for each part as described below: i) Define the following signal in time and plot it where Ai 10, A2-3, fi-10 Hz, f2-40 Hz. part of the DFT, and discuss the results. zero. Do this carefully for both positive and negative frequencies. Call this signal G (f). ii) Compute the DFT S(f) of s (t) using the fft() function. Plot the...

  • Using QAM we wish to transmit the following baseband message signals Bcos (w t a) Show the time and frequency domain expression for the transmitted signal. Also, plot the magnitude of the frequency d...

    Using QAM we wish to transmit the following baseband message signals Bcos (w t a) Show the time and frequency domain expression for the transmitted signal. Also, plot the magnitude of the frequency domain representation of the signal. b) On the receiver end, we demodulate the received signal by multiplying with 2cos(Wet +Au). Derive the expression of the demodulated signal in the time domain, before low-pass filtering. c) Derive the Fourier Transform of the demodulated signal. Using QAM we wish...

  • Exercises: u used to the instructor b the end of next lab. 20 102 Plot the f(t)-sinc(20r) cos(300...

    Exercises: u used to the instructor b the end of next lab. 20 102 Plot the f(t)-sinc(20r) cos(300t)sinc (10t) cos(100t) Use the fast Fourier transform to find the magnitude and phase spectrum of the signal and plot over an appropriate range. Use appropriate values for the time interval and the sampling interval. Note that in Matlab sinc(x)-, so we need to divide the argument by n to make it match the given function. Le, sinc(20t/pi) Hint: Use the parameters from...

  • Given an energy signal x(t) = (t-5T)e-t-T) , where T-0.1 compute its energy spectrum density in...

    Given an energy signal x(t) = (t-5T)e-t-T) , where T-0.1 compute its energy spectrum density in Matlab 1. use two different methods to a. Get its spectrum using Fourier transformation, follovfed by the squaring its amplitude. Plot its Fourier transformation and its energy spectrum density. Get its autocorrelation function, followed by its Fourier transformation. Plot its autocorrelation function and its energy spectrum density. b. 2. In a multipath channel, the received signal y (t) x(t) 0.15x(t -6T) +0.09x(t 10.5T), plot...

  • Power Spectrum of AM A baseband message signal is given byWn (t)-5 cos 2π 2500t +...

    Power Spectrum of AM A baseband message signal is given byWn (t)-5 cos 2π 2500t + 4 cos 2π 5500. An AM waveform carrying this message g(t)-50[1 + μ m(t) mp]cos 2π5x 109, where mp s the peak value of m(t a) Plot (by hand) the power spectrum S (f) of the AM waveform g(t) with 0.6 (You can get help with this from the handout A Power Spectrum Primer. See the section "Finding the Power Spectrum of a Periodic...

  • number 2 ECE 300 Continuous-Time Signals and Systems H(jø π/2 Plot the spectrum Z (jø) of the filtered input signal z()...

    number 2 ECE 300 Continuous-Time Signals and Systems H(jø π/2 Plot the spectrum Z (jø) of the filtered input signal z(), the spectrum Z, (jo) of the sampled signal z.(t), and the spectrum Y(ja) of the reconstructed signal y(t). Show clearly how the output spectrum Y (ja) differs from the original spectrum G(jo) C. Which system, A or B, produces less distortion between the input g(t) and the output y(4) or ()? Explain. You can measure distortion by finding the...

  • The following periodic signal is input to an ideal low pass filter of bandwidth 25 KHz. 1. x(t) 2...

    The following periodic signal is input to an ideal low pass filter of bandwidth 25 KHz. 1. x(t) 2 a) Determine the average power of the signal x(t). b) If T 0.1 ms, give the output of the filter as a function of time, y(t) e) Determine the average power of the signal y(t) d) Determine the bandwidth of the signal y(), considered as a baseband signal. e) Now assume that the signal x() (with T-0.1 ms) is instead input...

  • Please answer in MATLAB, thank you! 2. Calculate the energy of time domain signal x (t) and z (t) for the range of 0SIS...

    Please answer in MATLAB, thank you! 2. Calculate the energy of time domain signal x (t) and z (t) for the range of 0SIS2.5 Also calculate the energy of these signals in frequency domain using Parseval's theorem. Plot Energy (X) and Energy (Z) as a function of frequency f in a 2xl subplot (Energy vs frequency plot is know as energy spectrum of a signal). 2. Calculate the energy of time domain signal x (t) and z (t) for the...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT