How to solve the problem?

1 visualización (últimos 30 días)
Roy ovijit
Roy ovijit el 25 de Abr. de 2021
Respondida: Alan Stevens el 25 de Abr. de 2021
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)

Respuesta aceptada

Alan Stevens
Alan Stevens el 25 de Abr. de 2021
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

Más respuestas (0)

Categorías

Más información sobre Animation en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by