Question

Use Matlab to create: Step continuous signal at any starting time, Ramp continuous signal at any...

Use Matlab to create: Step continuous signal at any starting time, Ramp continuous signal at any starting time, Add and subtract two signals, Shifted signals by any time

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

clc,clear, close all

%% Step continuous signal at any starting time t0
u = @(t,t0) t>=t0;

%% Ramp continuous signal at any starting time t0
r = @(t,t0) (t-t0).*(t>t0);

%% plotting step signal
%
t = -10:0.1:10; % time vector
t0 = 0; % starting at 0
figure
plot(t,u(t,t0))
xlabel('t'),ylabel('u(t,t_0)')
title(['t_0 = ' num2str(t0)])
%% plotting ramp signal
%
t = -10:0.1:10; % time vector
t0 = 0; % starting at 0
figure
plot(t,r(t,t0))
xlabel('t'),ylabel('r(t,t_0)')
title(['t_0 = ' num2str(t0)])
%% add two signals
%
t = -10:0.1:10; % time vector
% adding shifted step and ramp
a = 2; % t0 for ramp
b = -2; % t0 for step
y = r(t,a) + u(t,b);
figure
plot(t,y)
xlabel('t'),ylabel('y')
title(['y = r(t, ' num2str(a) ') + u(t, ' num2str(b) ')'])
%% subtract two signals
%
t = -10:0.1:10; % time vector
% substracting shifted step from ramp
a = 1; % t0 for ramp
b = -1; % t0 for step
z = r(t,a) - u(t,b);
figure
plot(t,z)
xlabel('t'),ylabel('z')
title(['z = r(t, ' num2str(a) ') + u(t, ' num2str(b) ')'])


------------------------------------------------------------------------------
COMMENT DOWN FOR ANY QUERY RELATED TO THIS ANSWER,

IF YOU'RE SATISFIED, GIVE A THUMBS UP
~yc~

Add a comment
Know the answer?
Add Answer to:
Use Matlab to create: Step continuous signal at any starting time, Ramp continuous signal at any...
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
  • step by step please. Consider two continuous time signals given below. Keeping b(t) as a fixed...

    step by step please. Consider two continuous time signals given below. Keeping b(t) as a fixed signal, graphically calculate c(t) where c (t) = a(t) .b(t). b(t) Solution:

  • (A.) Use MATLAB to generate a pulsed sine wave signal having a frequency F-10KHZ and a...

    (A.) Use MATLAB to generate a pulsed sine wave signal having a frequency F-10KHZ and a pulse width of T-.5ms. The pulse repetition time is 1ms (pulse repetition rate is 1000 pulses/sec), i.e., the signal is zero between pulses. Model the signal to start at time t-0 and to end at a time t=Tstop. Use a sample time of .001ms to approximate an analog environment. Display the signal in MATLAB appropriate for an analog signal, first for Tstop 1ms and...

  • need matlab code Exercise: Use MATLAB to generate a low frequency signal: xy(t) = 3 cos(1400)...

    need matlab code Exercise: Use MATLAB to generate a low frequency signal: xy(t) = 3 cos(1400) And a higher frequency signal: xz(t) = 2 cos(10,000st) Now add these two signals together to generate the dual-component signal: y(t) = 3 cos(14007a)+ 2 cos(10,000) Points to be addressed: Again, manually calculate the theoretical magnitude spectra of y(t) and show this in your report (use Microsoft Visio or similar for your diagram). Clearly label all axes! Contrast this working to what you see...

  • 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...

  • Q. 2 A continuous time signal x(t) has the Continuous Time Fourier Transform shown in Fig...

    Q. 2 A continuous time signal x(t) has the Continuous Time Fourier Transform shown in Fig 2. Xc() -80007 0 80001 2 (rad/s) Fig 2 According to the sampling theorem, find the maximum allowable sampling period T for this signal. Also plot the Fourier Transforms of the sampled signal X:(j) and X(elo). Label the resulting signals appropriately (both in frequency and amplitude axis). Assuming that the sampling period is increased 1.2 times, what is the new sampling frequency 2? What...

  • Its related to MATLAB Generate a continuous-time signal z(t)-cos(2π 10t + 5) + cos(2π30t + 5). You may use the part of...

    Its related to MATLAB Generate a continuous-time signal z(t)-cos(2π 10t + 5) + cos(2π30t + 5). You may use the part of the followings. a >>t0:0.001:1; >plot (t, x_t) b. Generate a discrete-time signal x[n] = (1/4)(u[n]-u[n-4). You may use the part of the followings >>a_n-ones (1, 4) s> b_nzeros (1, 7) >> stem(n, x n) Generate a continuous-time signal z(t)-cos(2π 10t + 5) + cos(2π30t + 5). You may use the part of the followings. a >>t0:0.001:1; >plot (t,...

  • Create a sinusoidal signal V(in) with the following parameters – VOFF = 10 + 2V, AMPLITUDE...

    Create a sinusoidal signal V(in) with the following parameters – VOFF = 10 + 2V, AMPLITUDE = 3V, FREQUENCY= 500 Hz. Design a level shifting circuit such that the lower peak of V(in) is shifted to 5V, and the higher peak of V(in) is shifted to 0. Show by means of PSPICE Time Response simulation that your circuit really works. [Continue to use the two 9V batteries]. Make sure to explain every step in your design.

  • Digital Signal Processing (EEC 4963) Assignment 1 Discrete-Time Signals Express the signal 1. 1, 3sns-1 71 elsewher...

    Digital Signal Processing (EEC 4963) Assignment 1 Discrete-Time Signals Express the signal 1. 1, 3sns-1 71 elsewhere 0, using each of the following representation methods (a) Graphical representation. (b) Sequence representation. (c) In terms of the unit sample function, δ[n], unit step function, u[n], and the unit ramp function, r[n]. Digital Signal Processing (EEC 4963) Assignment 1 Discrete-Time Signals Express the signal 1. 1, 3sns-1 71 elsewhere 0, using each of the following representation methods (a) Graphical representation. (b) Sequence...

  • For Problems (9-10), use the continuous-time system depicted below which converts the input signal X(t) into...

    For Problems (9-10), use the continuous-time system depicted below which converts the input signal X(t) into the corresponding output signal y(t) = {x()} = 10 x(t) u(t - 3). system y(t) = $ { x(t) } = 10 x(t) · u(t – 3). (9) (10 points) (a) Compute the formula for the Ramp Response, yramp(t) = { r(t)}. (b) Plot the Ramp Response. Label both axes. Give key values of time and amplitude. (10) (10 points) (a) Compute the formula...

  • Problem (8) MATLAB Problem) Write a Matlab Function that plots the of the following signal in...

    Problem (8) MATLAB Problem) Write a Matlab Function that plots the of the following signal in the discrete time domain for any value of the shift k and for any range of it: nak *(1 – k) = fccm (c(n - keink 0. n<R Problem (9) MATLAB Problem) Subplot the following signals in the same figure choose an appropriate range for : x(n) = b cos (0.1bana ym) = 2"sin (0.1b mn + ) וחו

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