load nfir
un=(u-meshgrid(um,1:size(u,1)))./meshgrid(r,1:size(u,1));
yn=(y-meshgrid(ym,1:size(y,1)))./meshgrid(s,1:size(y,1));

Q=size(u,1);
ui1=zeros(Q,4);
ui1(2:Q,1:2)=un(1:(Q-1),1:2);
ui1(3:Q,3:4)=un(1:(Q-2),1:2);
ui2=zeros(Q,4);
ui2(2:Q,1:2)=un(1:(Q-1),3:4);
ui2(3:Q,3:4)=un(1:(Q-2),3:4);
ui=[ui1'; ui2'];

%ui1=un(:,1:2);
%ui2=un(:,3:4);
%ui=[con2seq(ui1'); con2seq(ui2')];

ys=sim(net,ui)';
%ys=seq2con(sim(net,ui));
%ys=ys{1}';
plot(t,yn,'.',t,ys);
