Question: changing of matlab

I have a program in  matlab,

I want to change below code in maple,

 

 

henon_map = inline('[a-x.^2+b*y x]','a','b','x','y');

%a=input('a [0] = ');
b=input('b [0.4] = ');

%if(isempty(a))
% a=0
%end

if(isempty(b))
 b=0.4
end

Npts=200;
Ntrans=100;
Ntot=Ntrans+Npts;

% For the whole window:
fig1=1; fig2=2;xmin=-2;xmax=2; Nmin=1; Nmax=50;
amin = -0.09;
amax = 1.249;
Na = 200;

%% For the zoom on the period doubling
%fig1=3; fig2=4;xmin=-0.9;xmax=1.4; Nmin=Ntrans; Nmax=20;
%amin = 0.8;
%amax = 1;
%Na = 250;

%% For the zoom of the zoom on the period doubling
%fig1=5; fig2=6;xmin=-0.9;xmax=1.4; Nmin=Ntrans; Nmax=20;
%amin = 0.96;
%amax = 0.995;
%Na = 150;

aa = linspace(amin,amax,Na);

x0=(b-1)/2;
y0=x0;
xo=x0;
yo=y0;
ms=5;
lw=2;
fs=15;

figure(fig2);clf
hold on
axis([Nmin Nmin+Nmax xmin xmax]);
set(gca,'FontSize',[fs]);
xlabel('n'); ylabel('x_n');
p2 = plot(Nmin:Nmin+Nmax,x0*ones(1,Nmax+1),'o-','EraseMode','xor');
title(['Orbit: b=',num2str(b)]);

figure(fig1);clf
hold on
a1=linspace(-0.25*(1-b)^2,0.75*(1-b)^2,100);
a2=linspace(0.75*(1-b)^2,0.85,100);
a3=linspace(0.85,amax,100);
axis([amin amax xmin xmax]);

% fixed points
x11 = (b-1+sqrt((1-b)^2+4*a1))/2;
x12 = (b-1-sqrt((1-b)^2+4*a1))/2;
x11b = (b-1+sqrt((1-b)^2+4*a2))/2;
x12b = (b-1-sqrt((1-b)^2+4*a2))/2;
x11c = (b-1+sqrt((1-b)^2+4*a3))/2;
x12c = (b-1-sqrt((1-b)^2+4*a3))/2;

% period-2 orbits
x21 = (1-b+sqrt((1-b)^2-4*(-a2+(1-b)^2)))/2;
x22 = (1-b-sqrt((1-b)^2-4*(-a2+(1-b)^2)))/2;
x21b = (1-b+sqrt((1-b)^2-4*(-a3+(1-b)^2)))/2;
x22b = (1-b-sqrt((1-b)^2-4*(-a3+(1-b)^2)))/2;

plot(a1,x11,'k','LineWidth',lw);
plot(a1,x12,'k--','LineWidth',lw);
plot(a2,x11b,'k--','LineWidth',lw);
plot(a2,x12b,'k--','LineWidth',lw);
plot(a3,x11c,'k--','LineWidth',lw);
plot(a3,x12c,'k--','LineWidth',lw);
plot(a2,x21,'r','LineWidth',lw);
plot(a2,x22,'r','LineWidth',lw);
plot(a3,x21b,'r--','LineWidth',lw);
plot(a3,x22b,'r--','LineWidth',lw);

p1 = plot(amin-1,x0,'.','EraseMode','none','MarkerSize',ms);
hold on
set(gca,'FontSize',[fs]);
xlabel('a'); ylabel('x_n');
title(['Henon map: bifurcation diagram: b=',num2str(b)]);

fprintf('Position windows and press any key to continue...\n');
pause
figure(fig2)
figure(fig1)

XX=[];
X=[x0];
Y=[y0];

for a=aa
 A=ones(1,Npts)*a;
 if abs(xo)>100
  xo=x0;
  yo=y0;
 end
 for i=1:Ntot
  H=henon_map(a,b,xo,yo);
  xn=H(1);
  yn=H(2);
  X=[X xn];
  Y=[Y yn];
  xo=xn;
  yo=yn;
 end

 [temp,jj]=min(X(Nmin:Nmin+Nmax));
 XX=[XX ; X(Ntrans+1-jj:Ntot-jj)];

 set(p1,'Xdata',A,'YData',X(Ntrans+1:Ntot))
 set(p2,'Xdata',Nmin:Nmin+Nmax,'YData',X(jj+Nmin:jj+Nmin+Nmax))
 drawnow

 X=[X(Ntot:Ntot)];
 Y=[Y(Ntot:Ntot)];
end

figure(fig1)
plot(aa,XX,'.','MarkerSize',ms);


Please Wait...