Wave Packets
(a) Create a wave by adding two different waves by using Matlab, but different combination than those we used in the class. Paste the output graph (and also the code). Any two waves can be chosen, but explain the difference compared to the original wave packet we obtained in the class. You can modify the code I used in the class, or build something from scratch.
(b) Add as much waves as you want (minimum:3), using Matlab. Explain your result in some way.
the weaves that we used in class:
>> % Wave packets
lambda1=9;lambda2=11;
v1=6;v2=4;
k1=2*pi/lambda1;k2=2*pi/lambda2;
omega1=6*k1;omega2=4*k2;
delomega=omega1-omega2
x=linspace(-70,70,1000);
t=linspace(0,1,100);
for
n=1:length(t)
y1(:,n)=cos(k1.*x-omega1.*t(n));
y2(:,n)=cos(k2.*x-omega2.*t(n));
ysum(:,n)=y1(:,n)+y2(:,n);
end
figure(1)
hold on
ylim([-8 4])
plot(x,ysum(:,1),'-.k')
plot(x,ysum(:,33),'r') %t=0.33
xline(0)
xline(5,'r')
xline(2,'--b')
plot(x,y1(:,1)-5,'-.k')
plot(x,y1(:,33)-5,'b') %t=0.33
figure(2)
hold on
ylim([-8 4])
plot(x,ysum(:,1),'-.k')
plot(x,ysum(:,100),'r') %t=1
xline(0)
xline(15,'r')
xline(6,'--b')
plot(x,y1(:,1)-5,'-.k')
plot(x,y1(:,100)-5,'b') %t=1
delomega =
1.9040
ans =
ANS:
The question is answered below.
Dear Friend,
malab code is provided below. I am also attaching the output graphs also. since the combination you have used in your class is not given, i am taking general and simple waveforms which are easy to understand by you. if you want other waveforms to be used , then just replace x1 and x2 with your waveforms.
MATLAB CODE:-
t=0:.00001:.1;
f1=100;
f2=200;
x1=sin(2*pi*f1*t);
x2=cos(2*pi*f2*t+90);
y=x1+x2;
subplot(311)
plot(t,x1);
subplot(312)
plot(t,x2);
subplot(313)
plot(t,y);

NOTE:Please upvote.
Wave Packets (a) Create a wave by adding two different waves by using Matlab, but different...
I wrote a Matlab program for the figure below. When I plot the waves, they look the same. Why do the two waves frequencies look same and How do I avoid it? (I really do need this part of the question answered.) N = 200; % Total number of time domain samples in simulation. Fs = 100 ;% sampling frequency. F1 = 10; % frequency of wave - 1. F2 = 90; % frequency of wave - 2. phi =...
The following two waves are sent in opposite directions on a horizontal string so as to create a standing wave in a vertical plane y1(x, t) = (6.30 mm) sin(6.50TX . 420 Y2(x, t) (6.30 mm) sin(650TX + 42urt), with x in meters and t in seconds. An anitinode is located at point A. In the time interval that point takes to move from maximum upward displacement to maximum downward displacement, how far does each wave move along the string?...
Hello. I need help modifying this MatLab code. This is a basic slider-crank animation. the current program stops the animation and then has the crank move backward. I need the crank to instead to move in full 360 degrees circular motion. Exactly like how a slide-crank mechanism works in real life. thank you and here is the code. %%Code Begins Here%% L1=0.2; L2=0.45; W=0.5; tt=linspace(0,15); for i=1:length(tt) x2=@(t) L2+L1*sin(W*t); y2=0; X2=x2(tt(i)); Y2=y2; sol= fsolve(@(x,x2,y2) root2d(x,X2,Y2),...
Reproduce Figures 9.2b and 9.2c on MATLAB, assuming that the
square wave (Figure 9.2b) is a periodic symmetric square wave of
normalized amplitude (A=1). Each student group should
decide the power spectral density level of the channel noise.
Compute the Fourier transform of the periodic square wave.
clear all
close all
%%%%
T=12*pi; %number of period
x=linspace(0,T);
t=x/pi
y0=square(x); %square wave signal
y0ft=fft(y0); %calculating Fourier Transformof signal
y0fts=fftshift(y0ft);
y0ftFinal=abs(y0ft);
AWGN= rand(size(x)); %Calculating whit noise
Att=(1/3);
nSig= Att*AWGN;
y=y0+nSig; %Square wave...
A standing wave results from the sum of two transverse traveling waves given by y1 = ymcos(kx - ωt) and y2 = ymcos(kx + ωt) where ym = 0.047 m, k = 3.2 rad/m, and ω = 12 rad/s. (a) What is the smallest positive value of x that corresponds to a node? Beginning at t = 0, what is the value of the (b) first, (c) second, and (d) third time the particle at x = 0 has zero...
A standing wave results from the sum of two transverse traveling waves given by y1 = ymcos(kx - ωt) and y2 = ymcos(kx + ωt) where ym = 0.057 m, k = 4.4 rad/m, and ω = 13 rad/s. (a) What is the smallest positive value of x that corresponds to a node? Beginning at t = 0, what is the value of the (b) first, (c) second, and (d) third time the particle at x = 0 has zero...
I need help in MATLAB. I'm working on a circuits lab report and I want to plot the derivative of an input signal. The circuit is a differentiator OpAmp. It is receiving a triangle wave as an input and should output a square wave. (I've included my existing code.) The output formula is: Vout = -(Rf)*C*(dVin/dt) Where Rf is feedback resistance: Rf = 1*10^6; and C = 1*10^-6. EXISTING CODE: %% This section is copied, and then modified from another...
function [Rx] = matrixTransform(R)
% MOD10TRANSFORM is a function which will visualise the effect of
your
% 2-by-2 transformation matrix R on a set of grid points. It will
also plot
% the eigenvectors of the matrix R if there are two real
eigenvectors.
close all;
minX = -10;
maxX = 10;
minY = -10;
maxY = 10;
n = 10;
pad = 5;
corners = [minX, maxX, minX, maxX; maxY, maxY, minY,
minY];
corners = [corners, R*corners];
corners =...
Can you write hand solutions and matlab code please?
Q3) There is a square wave with the period of T=21. The amplitude is 3 between 0 and it The amplitude is 0 between 1 and 2 T. 2 3 4 5 a) Find the Fourier series coefficients of this square wave. a = x()ật Il x(t)cos(kt)dt bx = ( x(t)sin(kt)dt b) Using Matlab, plot the truncated Fourier series; (1) For k 0 to 10 (II) For k 0 to 1000...
solve this question by using MATLAB.
Q1: The van't Hoff equation in chemical thermodynamics relates the change in temperature (T) to the change in the equilibrium constant (K) given the standard enthalpy change (A) for the process. If the enthalpy change of reastion ig asumed to be constant with tempernture the van't Hoff equation may be written as: K2) = _(1-1 Plot Ink, versus T, for the reaction N2+3112艹2 NH, from 300 K to 400 K (10 K intervals). Label...