Fitxer:Numerical integration illustration, h=1.png

El contingut de la pàgina no s'admet en altres llengües.
De la Viquipèdia, l'enciclopèdia lliure

Fitxer original(1.500 × 2.183 píxels, mida del fitxer: 72 Ko, tipus MIME: image/png)

Descripció a Commons
File:Numerical integration illustration, step=1.svg és una versió vectorial (SVG) d'aquest fitxer. En cas de ser millor, hauria de ser emprada en lloc d'aquesta imatge tramada.

File:Numerical integration illustration, h=1.png → File:Numerical integration illustration, step=1.svg

Per a més informació pel que fa als gràfics vectorials, llegiu la transició a SVG en Commons.
També hi ha informació quant a la compatibilitat del MediaWiki amb les imatges SVG.

En altres idiomes
Alemannisch  Bahasa Indonesia  Bahasa Melayu  British English  català  čeština  dansk  Deutsch  eesti  English  español  Esperanto  euskara  français  Frysk  galego  hrvatski  Ido  italiano  lietuvių  magyar  Nederlands  norsk bokmål  norsk nynorsk  occitan  Plattdüütsch  polski  português  português do Brasil  română  Scots  sicilianu  slovenčina  slovenščina  suomi  svenska  Tiếng Việt  Türkçe  vèneto  Ελληνικά  беларуская (тарашкевіца)  български  македонски  нохчийн  русский  српски / srpski  татарча/tatarça  українська  ქართული  հայերեն  বাংলা  தமிழ்  മലയാളം  ไทย  한국어  日本語  简体中文  繁體中文  עברית  العربية  فارسی  +/−
Nova imatge SVG

Resum

Descripció Illustration of Numerical ordinary differential equations
Font Treball propi
Autor Oleg Alexandrov
 
Aquesta PNG imatge rasteritzada ha estat creada amb MATLAB.
Public domain Jo, el titular del copyright d'aquesta obra, l'allibero al domini públic. Això s'aplica a tot el món.
En alguns països això pot no ser legalment possible, en tal cas:
Jo faig concessió a tothom del dret d'usar aquesta obra per a qualsevol propòsit, sense cap condició llevat d'aquelles requerides per la llei.

Source code (MATLAB)

 

% illustration of numerical integration
% compare the Forward Euler method, which is globally O(h) 
% with Midpoint method, which is globally O(h^2)
% and the exact solution

function main()

   f = inline ('y', 't', 'y'); % will solve y' = f(t, y)

   a=0; b=4; % endpoints of the interval where we will solve the ODE
   N = 5; T = linspace(a, b, N); h = T(2)-T(1); % the grid
   y0 = 1; % initial condition

   % solve the ODE
   Y_euler = solve_ODE (N, f, y0,  h, T, 1); % Forward Euler method
   Y_midpt = solve_ODE (N, f, y0,  h, T, 2); % midpoint method
   T_highres = a:0.1:b; Y_exact = exp(T_highres);
   
%  prepare the plotting window
   lw = 3; % curves linewidth
   fs = 20; % font size
   figure(1); clf; set(gca, 'fontsize', fs);   hold on;

   % colors
   red=[0.867 0.06 0.14];
   blue = [0, 129, 205]/256;
   green = [0, 200,  70]/256;

% plot the solutions
   plot(T, Y_euler, 'color', blue,  'linewidth', lw)
   plot(T, Y_midpt, 'color', green, 'linewidth', lw)
   plot(T_highres, Y_exact, 'color', red,   'linewidth', lw)

   % axes aspect ratio
   pbaspect([1 1.5 1]);

% save to disk
   disp(sprintf('Grid size is %0.9g', h))
   saveas(gcf, sprintf('Numerical_integration_illustration,_h=%0.2g.eps', h), 'psc2');
   
function Y = solve_ODE (N, f, y0,  h, T, method)

   Y = 0*T;
   
   Y(1)=y0;
   for i=1:(N-1)
	  t = T(i); y = Y(i);

	  if method == 1 % forward Euler method
		 
		 Y(i+1) = y + h*f(t, y);
		 
	  elseif method == 2 % explicit one step midpoint method
		 
		 K = y + 0.5*h*f(t, y);
		 Y(i+1) =  y + h*f(t+h/2, K);
		 
	  else
		 disp ('Don`t know this type of method');
		 return;
		 
	  end
   end

Llegendes

Afegeix una explicació d'una línia del que representa aquest fitxer

Elements representats en aquest fitxer

representa l'entitat

Historial del fitxer

Cliqueu una data/hora per veure el fitxer tal com era aleshores.

Data/horaMiniaturaDimensionsUsuari/aComentari
actual04:57, 25 maig 2007Miniatura per a la versió del 04:57, 25 maig 20071.500 × 2.183 (72 Ko)Oleg AlexandrovMake exact curve smooth
06:59, 20 maig 2007Miniatura per a la versió del 06:59, 20 maig 20071.500 × 2.183 (72 Ko)Oleg AlexandrovHigher resolution. Same license.
05:09, 20 maig 2007Miniatura per a la versió del 05:09, 20 maig 2007375 × 546 (15 Ko)Oleg Alexandrov{{Information |Description=Illustration of Numerical ordinary differential equations |Source=self-made |Date= |Author= User:Oleg Alexandrov }} Category:Numerical analysis {{PD-self}}

La pàgina següent utilitza aquest fitxer:

Ús global del fitxer

Utilització d'aquest fitxer en altres wikis: