필터 지우기
필터 지우기

How to solve the problem?

조회 수: 1 (최근 30일)
Roy ovijit
Roy ovijit 2021년 4월 25일
답변: Alan Stevens 2021년 4월 25일
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