Code covered by the BSD License  

Highlights from
toolbox for analysis of complex system using fixed points

image thumbnail
from toolbox for analysis of complex system using fixed points by Edgar Bernal-Flores
Coweb theorem of the value of derivation fied points in the system

[orbita puntosorbita puntofijos ]=Coweb(funcion,x0,itera,a,b)
% METODO COWEB PARA DETECCION DE PUNTOS FIJOS EN FUNCIONES
% VER 2.0
% AUTOR: EDGAR BERNAL FLORES
% 16022009
%email: tecualoya@hotmail.com
function [orbita puntosorbita puntofijos ]=Coweb(funcion,x0,itera,a,b)

% ENTRADA: X0->Es un punto de inicio en donde comenzaremos a realizar las iteraciones para llegar al punto fijo
%          Nitera-> es el numero de iteraciones a realizar dentro del intervalo X1 y X2 comenzando en X0
%          funcion-> esla funcion a evaluar y en la cual se obtienen los puntos fijos
%          X1 y X2 -> son los limites en los cuales podemos realizar la graficacion y las orbitas de la funcion
%          
% SALIDA : orbita-> es la secuencia de valores antes de llegar a un punto fijo
%          puntosfijos-> son los valores de donde se encuetran los puntos fijos de la funcion
%          
% NOTA:  CONSIDERAMOS LAs SIGUIENTEs ECUACIONES:
%                     PARA PODER ONTENER LOS PUTNOS FIJOS -> f(x)-x=0
%                     PARA CALCULAR LAS ORBITAS X0,F'(X0)=X1,F''(X1),....
close all
clc

% GRAFICAMOS LA FUNCION A EVALUAR Y LA FUNCION IDENTIDAD
a
b
xi=@(x)x;
% fplot(funcion,[a b]);
fplot(@(x)[funcion(x),xi(x)],[a,b]);
axis('normal');
xlim([a b]);
ylim([a b]);
xlabel('X')
ylabel('F(X)')
title('Analisis Coweb')
grid
hold on
%  fplot(x,[a,b]);
x0

%CALCUALOMOS LOS PUNTOS FIHOS DE NUESTRO SISTEMA
% puntosfijos=solve(funcion.-xi);
% puntosfijos
% ObNTENEMOS LA ORBITA DE NUESTRO PUNTO DE INICIO
% puntosorbita(1,:)=[0 0];
orbita(1)=0;
for i1=2:(itera+1)
    
    if (i1==2)
        orbita(i1)=x0;
    elseif(i1==3)
        orbita(i1)=funcion(x0);
    else
        orbita(i1)=funcion(orbita(i1-1));
    end
end
orbita

puntosorbita(1,:)=[orbita(1) orbita(1)];
i2=2;
while i2<(2*itera+1)
    puntosorbita(i2,:)=[orbita(i2-1) orbita(i2)];
    if(i2==(2*itera))
       break;
    else
        
      puntosorbita((i2+1),:)=[orbita(i2) orbita(i2)];
      a=    puntosorbita(i2+1,:)=[orbita(12) orbita(12)];
    end
end
puntosorbita

% TOMAMOS LOS PUNTOS DE LA ORBITA CREADOS ANTERIORMENTES Y LOS GRAFICAMOS
for i2=1:length(puntosorbita(:,1))
plot(puntosorbita(i2,1),puntosorbita(i2,2),'r-',puntosorbita(i2,1),puntosorbita(i2,2),'go');
end

Contact us at files@mathworks.com