Plot of recurring system in MATLAB, Lozi map

602 Views Asked by At

I need to write this recurring system in MATLAB $$ x_{n+1}=1-a|x_n|+y_n$$ $$ y_{n+1}=bx_n $$ and take its plot for every $x_i,y_i$,with let's say a=1.4 and b=0.7. $$$$This is the Lozi map. And this link might help: http://mathworld.wolfram.com/LoziMap.html

Thanks in advance and hope for your help!

1

There are 1 best solutions below

3
On BEST ANSWER

Try the following

function [x,y]=lozi(n,a,b,x1,y1)
    x=zeros(n,1);
    y=x;
    x(1) = x1;
    y(1) = y1;
    for k=2:n
        x(k) = 1 - a*abs(x(k-1)) + y(k-1);
        y(k) = b*x(k-1);
    end
end

Then call the function with desired parameters and plot the result.