Matlab程序编写和出图u(x,t) = 10 + 5*cos(2*pi*t/T) + (1 + cos(2*pi*t/T))*x/5 + sum{n=1 to n=N} ( (10/pi*n [(T/2*pi) * sin(2*pi*t/T) - (25/(pi*n))^2 cos(2*pi*t/T)] * sin(pi*n*x/25) )I need it once with T=1 and once with T=365.Also for N you can
来源:学生作业帮助网 编辑:作业帮 时间:2024/07/04 23:09:51
![Matlab程序编写和出图u(x,t) = 10 + 5*cos(2*pi*t/T) + (1 + cos(2*pi*t/T))*x/5 + sum{n=1 to n=N} ( (10/pi*n [(T/2*pi) * sin(2*pi*t/T) - (25/(pi*n))^2 cos(2*pi*t/T)] * sin(pi*n*x/25) )I need it once with T=1 and once with T=365.Also for N you can](/uploads/image/z/13391465-41-5.jpg?t=Matlab%E7%A8%8B%E5%BA%8F%E7%BC%96%E5%86%99%E5%92%8C%E5%87%BA%E5%9B%BEu%28x%2Ct%29+%3D+10+%2B+5%2Acos%282%2Api%2At%2FT%29+%2B+%281+%2B+cos%282%2Api%2At%2FT%29%29%2Ax%2F5+%2B+sum%7Bn%3D1+to+n%3DN%7D+%28+%2810%2Fpi%2An+%5B%28T%2F2%2Api%29+%2A+sin%282%2Api%2At%2FT%29+-+%2825%2F%28pi%2An%29%29%5E2+cos%282%2Api%2At%2FT%29%5D+%2A+sin%28pi%2An%2Ax%2F25%29+%29I+need+it+once+with+T%3D1+and+once+with+T%3D365.Also+for+N+you+can)
Matlab程序编写和出图u(x,t) = 10 + 5*cos(2*pi*t/T) + (1 + cos(2*pi*t/T))*x/5 + sum{n=1 to n=N} ( (10/pi*n [(T/2*pi) * sin(2*pi*t/T) - (25/(pi*n))^2 cos(2*pi*t/T)] * sin(pi*n*x/25) )I need it once with T=1 and once with T=365.Also for N you can
Matlab程序编写和出图
u(x,t) = 10 + 5*cos(2*pi*t/T) + (1 + cos(2*pi*t/T))*x/5 + sum{n=1 to
n=N} ( (10/pi*n [(T/2*pi) * sin(2*pi*t/T) - (25/(pi*n))^2 cos(2*pi*t/T)] *
sin(pi*n*x/25) )
I need it once with T=1 and once with T=365.Also for N
you can give any number,like 100,then 200,then 300 and so on.that will
create an animation,t=1000
Matlab程序编写和出图u(x,t) = 10 + 5*cos(2*pi*t/T) + (1 + cos(2*pi*t/T))*x/5 + sum{n=1 to n=N} ( (10/pi*n [(T/2*pi) * sin(2*pi*t/T) - (25/(pi*n))^2 cos(2*pi*t/T)] * sin(pi*n*x/25) )I need it once with T=1 and once with T=365.Also for N you can
% 定义符号变量
syms x t
syms T n N
% 函数表达式
u = 10 + 5*cos(2*pi*t/T) + (1 + cos(2*pi*t/T))*x/5 + symsum( (10/pi*n * ((T/2*pi) * sin(2*pi*t/T) - (25/(pi*n))^2 * cos(2*pi*t/T) ) * sin(pi*n*x/25) ), n, 1, N);
% 依次对T和N取不同值绘制曲面
for T1 = [1 365]
for N1 = 100 : 100 : 500
ezmesh( subs(u, {T,N}, {T1,N1}) )
title( sprintf('T = %i, N = %i', T1, N1) ) % 修改图形标题
drawnow % 更新绘图
end
end