Question

1. Consider a Gaussian solution of the traveling-wave form ψ(z,t)-exp(-a(z-vt)2). The parameter values are a 1, 2. (a) Explain the physical meaning of these parameters (eg. what would happen if we took a = 10 instead?) Determine the direction of propagation of this solution: Is it traweling to the left or to the right? (2pts) (b) Write a Matlab code to plot the Gaussian solution for the parameters a-1, u 2, and t 0, 1, 2, 3. Choose the range of x such that it is appropriate for visualization of all four curves. Use different plotting symbols for each time so that you can see how the solution evolves with time, and note the value of x at which the Gaussian is peaked for each time t. Please submit a listing of your code along with your numerical plot. (3pts) I need to see the MATLAB code pleaseMATLAB question I need the code exactly as you would write it in MATLAB. thank you

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

Hey,

Note: Brother in case of any queries, just comment in box I would be very happy to assist all your queries

clc;
close all
clear all
a=1;
v=2;
x=-3:0.01:10;
s={};
for t=0:3
y=exp(-a*(x-v*t).^2);
plot(x,y,'Color',rand(1,3));
hold on;
s{t+1}=sprintf('t=%d',t);
end
legend(s);

Figure 1 File Edit View nsert Iools Desktop Window Help 一1-0 t-2 1-3 0.9 0.8 0.7 0.6 0.5 0.4 0.3 0.2 0.1 10 .2 ENG 6:13 AM IN 02/04/19 O Type here to search

Kindly revert for any queries

Thanks.

Add a comment
Know the answer?
Add Answer to:
MATLAB question I need the code exactly as you would write it in MATLAB. thank you...
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
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