Plot the Wave function

12 ビュー (過去 30 日間)
Hasan Al Tarify
Hasan Al Tarify 2021 年 10 月 20 日
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 件)

カテゴリ

Help Center および File ExchangeCalculus についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by