Plot the Wave function
12 views (last 30 days)
Show older comments
I am trying to plot a wave function, which represnets a response of a string, as a function of x at each time of this set t = [0 0.0002 0.0004 0.0006]. The function is in a series form (which means that the wave function has three modes). Consider n = 1 to 3. I am not sure if I should use For loop twice here. Thank you
clc
clear all
syms n t x
n=10;
t = [ 0 0.0002 0.0004 0.0006];
for i=1:length(t)
for j=1:n
an = -4*251001*((sin(200*pi*i/501)+sin(100*pi*i/501))/(10*pi*(10000*i^2-251001)));
f= an*sin(pi*x*i/0.501)*cos(pi*2000*t*i/0.501);
end
fplot(f)
end
0 Comments
Answers (0)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!