Plot the Wave function
12 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Calculus 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!