Effacer les filtres
Effacer les filtres

Info

Cette question est clôturée. Rouvrir pour modifier ou répondre.

MATH using numerical equation

1 vue (au cours des 30 derniers jours)
reem
reem le 4 Avr 2013
Clôturé : MATLAB Answer Bot le 20 Août 2021
How can I represent this equation using MATLAB ( Numerical Solution)
The equation
(^2 f(x,y)/ x^2)-(2 ^2 f(x,y)/ y^2)+2f=2*cosy
Where f(0,y)=0 ; ∂f/ ∂x (0,0)=0 ; ∂f/ ∂y(0,0)=0
This is my program
Please tell me what is the mistake in my program
clear; clc;
Vx(1,:)=0;
Vy(:,1)=0;
h=0.1; f(1,:)=0;
for y=0:10
for i=1:10
for j=1:10
Vx(i+1,j+1)=(2.*cos(y).*h)+Vx(i,j);
Vy(i+1,j+1)=h*f(i,j)+Vy(i,j);
f(i+1,j)=f(i,j)+h*Vx(i,j);
f(i,j+1)=f(i,j)+h*Vy(i,j);
end
end
end
plot(f); grid
  1 commentaire
Jan
Jan le 4 Avr 2013
Please explain at first, why you assume, that there is a mistake. It would be a good strategy to share this knowledge with us.

Réponses (0)

Cette question est clôturée.

Community Treasure Hunt

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

Start Hunting!

Translated by