How to solve the problem?

1 次查看(过去 30 天)
I got my solution(poisson's equation). and I wanted to draw 3D plot of this solution. but I want to keep (b -equation parameter)as a constant . i did it. is it wrong or right?. i got my curve but it seems,it didn"t start by following initial condition.. how can I do that? here,is my code and equation. ( i'm new here. if any mistake,plz consider it)
x=0:.01:2;
y=0:.01:2;
b=0.5;[X, Y]=meshgrid(x, y);
uxy=zeros(size(X));
for a=1:2
m=a^2;
pn=(16*m*sinh(pi*Y/2*a).*cos(pi*X/2*a))/(pi^3*sinh(pi*b/2));
uxy=(m- X.^2)/2-pn;
end
surf(X, Y,uxy)

采纳的回答

Alan Stevens
Alan Stevens 2021-4-25
Like this?
x=0:.1:2;
y=0:.1:2;
b=0.5;[X, Y]=meshgrid(x, y);
uxy=zeros(size(X));
for a=1:2
m=a^2;
pn=(16*m*sinh(pi*Y/2*a).*cos(pi*X/2*a))/(pi^3*sinh(pi*b/2));
uxy=(m- X.^2)/2-pn;
figure
surf(X, Y,uxy)
end

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Animation 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by