早教吧 育儿知识 作业答案 考试题库 百科 知识分享

Matlab程序编写和出图u(x,t)=10+5*cos(2*pi*t/T)+(1+cos(2*pi*t/T))*x/5+sum{n=1ton=N}((10/pi*n[(T/2*pi)*sin(2*pi*t/T)-(25/(pi*n))^2cos(2*pi*t/T)]*sin(pi*n*x/25))IneeditoncewithT=1andoncewithT=365.AlsoforNyoucan

题目详情
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
▼优质解答
答案和解析
% 定义符号变量
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
看了 Matlab程序编写和出图u...的网友还看了以下: