Question

Using matlab. Consider the function s(t) defined for t in [0,4) by { -sin(pi*t/2)+1 , for...

Using matlab.

Consider the function s(t) defined for t in [0,4) by

{ -sin(pi*t/2)+1 , for t in [0,1)
s(t) = { -(t-2)^5 , for t in [1,3)
{ sin(pi*t/2)-1 , for t in [3,4)

(i) Generate a column vector s consisting of 512 uniform
samples of this function over the interval [0,4). (This
is best done by concatenating three vectors.)

Homework Answers

Answer #1

MATLAB code is given below in bold letters.

clc;
close all;
clear all;

% define time t
t = 0:0.01:4;

% now define the signal using logical expressions as below (concatenation is not required)
s = (-sin(pi*t/2)+1).*(t<=1) + (-(t-2).^5).*((t>1)&(t<=3)) ...
+ (sin(pi*t/2)-1).*((t>3)&(t<=4));

% now plot the signal as below
figure;
plot(t,s,'linewidth',2);grid on;xlabel('time');ylabel('Amplitude');title('s(t)');

Know the answer?
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
Similar Questions
Let h be the function defined by H(x)= integral pi/4 to x (sin^2(t))dt. Which of the...
Let h be the function defined by H(x)= integral pi/4 to x (sin^2(t))dt. Which of the following is an equation for the line tangent to the graph of h at the point where x= pi/4. The function is given by H(x)= integral 1.1 to x (2+ 2ln( ln(t) ) - ( ln(t) )^2)dt for (1.1 < or = x < or = 7). On what intervals, if any, is h increasing? What is a left Riemann sum approximation of integral...
Assignments Generate and plot the signal x1(t) = 1+ sin (4pt), for t ranging from -1...
Assignments Generate and plot the signal x1(t) = 1+ sin (4pt), for t ranging from -1 to 1 in 0.001 increments. Use proper axes labels with title. Generate and plot the function x2(t) = sin (30pt), for t ranging from -1 to 1 in 0.001 increments. Use proper axes labels with title. Generate and plot the combination function x3(t) = x1(t)*x2(t) as above. Use proper axes labels with title. Generate and plot the sum of two cosine waves   v1(t) =...
Given the function f(t) = 1/2cos (pi/3 *t) +3pi^2. Which of the following is equal to...
Given the function f(t) = 1/2cos (pi/3 *t) +3pi^2. Which of the following is equal to f'(t) f'(t) = 1/2sin(pi/3 t) +6pi f'(t) = -pi/3cos(pi/3 *t) f'(t) = -pi/6 sin(pi/3 T) f'(t) = pi/3 sin(pi/3 t) +6pit
Consider the following vector function. r(t) = <9t,1/2(t)2,t2> (a) Find the unit tangent and unit normal...
Consider the following vector function. r(t) = <9t,1/2(t)2,t2> (a) Find the unit tangent and unit normal vectors T(t) and N(t). (b) Use this formula to find the curvature. κ(t) =
Consider the wave function at t = 0, ψ(x, 0) = C sin(3πx/2) cos(πx/2) on the...
Consider the wave function at t = 0, ψ(x, 0) = C sin(3πx/2) cos(πx/2) on the interval 0 ≤ x ≤ 1. (1) What is the normalization constant, C? (2) Express ψ(x,0) as a linear combination of the eigenstates of the infinite square well on the interval, 0 < x < 1. (You will only need two terms.) (3) The energies of the eigenstates are En = h̄2π2n2/(2m) for a = 1. What is ψ(x, t)? (4) Compute the expectation...
1. Consider the plane 4x+y-2z=4 and the line r(t) = < t, -2t, -tt >. a....
1. Consider the plane 4x+y-2z=4 and the line r(t) = < t, -2t, -tt >. a. find the unit normal vector N of the plane. b. as a function of t find the distance between r(t) and the plane. 2. Consider a fruit fly flying a room with velocity v(t) = < -sin(t), cos(t), 1 > a. if the z = 1 + 2(pi) is the room's ceiling, where will the fly hit the ceiling? b. if the temperature in...
SIGNALS AND SYSTEMS Experiment 1    Signal Generation Date: January 1-8, 2018 The purpose of this...
SIGNALS AND SYSTEMS Experiment 1    Signal Generation Date: January 1-8, 2018 The purpose of this laboratory is to familiarize you with the basic commands in MATLAB for signal generation and verify the generated signal. Objectives 1.Learn basic MATLAB commands and syntax, including help system. 2.Use MATLAB ( from Citrix) to generate and plot different signals. Assignments Generate and plot the signal x1(t) = 1+ sin (4pt), for t ranging from -1 to 1 in 0.001 increments. Use proper axes...
Question : Design the low and high pass filter for the signal, x(t) = 10 sin...
Question : Design the low and high pass filter for the signal, x(t) = 10 sin (10 t) + 1 sin (1000 t) by MATLAB Is below answer right? at ?High pass , 5row shouldn't this change from sin(100*t) ? sin(1000*t) x = 10*sin(10*t) + 1*sin(100*t); ?   x = 10*sin(10*t) + 1*sin(1000*t); ??? ..................................................................................................................................................... ?Low pass clc; rng default Fs=2000; t=linspace(0,1,Fs); x=10*sin(10*t)+sin(1000*t)%given signal n=0.5*randn(size(t));%noise x1=x+n; fc=150; Wn=(2/Fs)*fc; b=fir1(20,Wn,'low',kaiser(21,3)); %fvtool(b,1,’Fs’,Fs) y=filter(b,1,x1); plot(t,x1,t,y) xlim([0 0.1]) xlabel('Time (s) ') ylabel('Amplitude') legend('Original Signal','Filtered Data')...
Curve-Fit Function USING MATLAB Using the top-down design approach, develop a MATLAB function A8P2RAlastname.m that reads...
Curve-Fit Function USING MATLAB Using the top-down design approach, develop a MATLAB function A8P2RAlastname.m that reads data from a file and performs regression analysis using polyfit and polyval. The function shall have the following features: The input arguments shall include the file name (string), a vector of integers for the degrees of polynomial fits to be determined, and an optional plot type specifier (‘m’ for multiple plots, ‘s’ for a single plot - default). The data files will be text...
Consider the function F(x, y, z) =x2/2− y3/3 + z6/6 − 1. (a) Find the gradient...
Consider the function F(x, y, z) =x2/2− y3/3 + z6/6 − 1. (a) Find the gradient vector ∇F. (b) Find a scalar equation and a vector parametric form for the tangent plane to the surface F(x, y, z) = 0 at the point (1, −1, 1). (c) Let x = s + t, y = st and z = et^2 . Use the multivariable chain rule to find ∂F/∂s . Write your answer in terms of s and t.