llevar de matlab a fortran
Publicado por toni (6 intervenciones) el 11/11/2014 03:40:53
Hola me pueden ayudar a llevar este problema de matlab a fortran.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
clear all
close all
clc
dt=0.1
x(1)=100
y(1)=40
t(1)=1
alf=0.25
bet=-0.01
gam=-1.0
del=0.01
for n=1:1000 ;
x(n+1)=x(n)+dt*(alf*x(n)+bet*x(n)*y(n)) ;
y(n+1)=y(n)+dt*(gam*y(n)+del*x(n)*y(n)) ;
t(n+1)=t(n)+dt ;
end
figure()
hold on
plot(t,x)
plot(t,y,'r')
grid on
figure(2)
plot(x,y,'g')
%%%%%GRACIAS%%%%%
%% Si lo tienen para gfortran mejor%%%%
Valora esta pregunta


0