级数求解问题从输入参数改成画图。
Ältere Kommentare anzeigen
clc;
clear all;
a=1;
b=2;
q0=1/32;
D=1/pi^6;
z=0;
x=0.5;
y=1;
for m=1:2:100
for n=1:2:100
fun =16*q0*sin(m*pi*x/a)*sin(n*pi*y/b)./(pi^6*D*m*n*(m^2/a^2+n^2/b^2)^2)
z=z+fun
end
end
大佬们好这是我写的求解级数的程序。现在这个程序只能手动输入x和y的值求一个z的值,请问怎么改能改成输出x从0到1,y从0到2的图像呢?
这是原函数

Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu 循环及条件语句 finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!