The square wave repeats at each 10s hence the period of the square wave is T=10s.
The sawtooth wave repeats at each 10s hence the period of the sawtooth wave is T=10s.
%%----------------------------------------MATLAB CODES----------------------------------------------%%
%%-------------------------Square
Wave-------------------------------%%
T=10; %time periof T=10s
t=0:0.01:5*T;
%plot upto 5*T
x=square(2*pi*0.1*t); % 2*pi*f*t where
f(frequency)=1/T =0.1
plot(t,x,'r') %plotting the curve
axis ([0 5*T -2
2])
% determining the ploting range
xlabel('time'),ylabel('y') %label teh axis
title('Square
wave') %give
it a name
%%------------------------------------------------------------------------------%%save it with square
%%----------------------------Sawtooth
Wave-----------------------------%%
T=10;
%time periof T=10s
t=0:0.01:5*T;
%plot upto 5*T
x=sawtooth(2*pi*0.1*(t-5)); % 2*pi*f*t where
f(frequency)=1/T =0.1,with a shift of 5s (delay)
plot(t,x,'r')
%plotting the curve
axis ([0 5*T -2
2])
% determining the ploting range
xlabel('time'),ylabel('y')
%label teh axis
title('Sawtooth
wave')
%give it a name
%%-----------------------------------------------------------------------------------%% save it with name sawtooth
Please note for proper execution of the code save each of the code in different mfile and run the simulation.
Plots obtained from the codes:
SQUARE WAVE :
SAWTOOTH WAVE:
Please slove using MATLAB Problem 4 a) Determine the periods of the following two signals. b)...
5. (20 pts) Using Matlab, plot 8 periods of the following three signals for the first N harmonics, where N 2,8,32. That is, for N 2, you would plot an approximation of x(t) for just the ao, a, a ,a2, a 2 coefficients. (t) is periodic with period 3 and x(t) e for t e [0,3] » Oppenheim & Willsky: Figure P3.22(a) on pg. 255 » Oppenheim & Willsky: Figure P3.22 (e) on pg. 256 x(t) 2 4 x(t) 7-6...
Please use matlab and attach the figures of the solution 7. Consider the following CT signals, all of them defined for -31 (o)-cos()-sin(4x) ,0)-1.5e 5,0)-)50- For each of these signals indicate whether it is even, odd, or neither, real or complex, periodic or non periodic, type I, type II, or neither. Plot each signal using MATLAB. If a signal is complex, plot magnitude and phase separately. Select a plotting interval and a sampling interval appropriate for the signal in question....
slove in Matlab AP2. A system is modeled by the following differential equation in which X(t) is the output and (() is the input: *+ 2x(t) + 5x(t) = 3u(t), x(0) = 0, X(t) = 2 a. Create a state-space representation of the system. b. Plot the following on the same figure for 0 st s 10 sec : i. the initial condition response (use the initial function) il the unit step response (use the step function) iii. the total...
Problem (D a) Consider the following two functions xuln] and x2[n]. Using MATLAB, plot the following combinations of the above two signals over a DT range, [-20, 20]. Problem (D a) Consider the following two functions xuln] and x2[n]. Using MATLAB, plot the following combinations of the above two signals over a DT range, [-20, 20].
MATLAB HELP Need help solving this one problem using matlab. The mass of the system shown in Figure is released from rest at x0_6in when t-0. i. Plot the response of mass x(t) for the following W-96.6 lb cases: (a) c4 lb.sec/ft, (b) c12 lb. sec/ft, (c) c 18 lb. sec/ft, (d) No damper Comment on the plots for the 4 different cases. ii. Everything should be done using computer including calculations, plots, etc...
please slove this question in MATLAB and explain clearly about it. Many thanks. Question 3. Given the following boundary-value problem Use the finite difference method to solve the problem with h 0.02. Plot your results. Question 3. Given the following boundary-value problem Use the finite difference method to solve the problem with h 0.02. Plot your results.
Determine the DTFS of (B) only. 1. Determine the DTFS of the following signals. Write a MATLAB program to calculate the coefficients Ck for each of the signals. Plot a) t[n] vs n, and b) Ck vs 2k. (a) 5 points: t[n] = cos(0.3an) (b) 5 points: t[n] = 1 + cos(0.24an) + 3 sin(0.56n)
Please help by writing a MATLAB Code for the this lab Fourier Series Synthesis You will consider five continuous-time signals 1- 2- for A D 4- We were unable to transcribe this imageWe were unable to transcribe this imager(t) e-t for-1 < t > 1 x(t) 2 2 4 3 3 x(t) -4 2 2 4 2 1, 0sts be a periodic signal with fundamental period T = 2 and Fourier coefficients ak. (a) Determine the value of ao (b)...
Please explain in detail and use MATLAB code. Thank you. Prob. 4-1 FM and PM are, respectively, defined as FM: A cos ((t) PM: A cos (kpm(t)) The FM and PM coefficients. kf and kp are kf-100 and kp-2, respectively. The carrier frequency is 400 Hz (1) Plot both the time-domain and frequency-domain representation for two independent message signals, m1(t) and m2(t) using MATLAB. Figure 1 is, again, the illustration of the Rectangular pulse (a) Tn1(t) = 11(t _ 0.5)...
MATLAB PROGRAM FOR THE FOLLOWING PROBLEM Using Matlab write a program that will plot the pressure signal, the perceived pressure signal, the resistance and the output voltage as functions of time, for Problem 1.30 in the textbook. (B) Using Matlab show a plot with the output voltage range if we happen to know that the transfer function (gain) has an uncertainty of 15% and the time constant has an uncertainty of 10%. (Note: the solution of the problem is provided...