function outs = nb(ins);
% outs = nb(ins);
% define a structure of type 'nb'

instclass = 'nb';


if (nargin == 0)
   outs = struct(...
      'v1', [],...
      'v2', [], ...
      'v3', [], ...
      'v4', [], ...
      'a1', [], ...
      'a2', [], ...
      'a3', [], ...
      'a4', [], ...   
      'sw1', [], ...
      'sw2', [], ...
      'sw3', [], ...
      'sw4', [], ...
      'temperature',  []   ,...
      'heading',   [], ...
      'dday',     []);

   
   outs = class(outs, instclass);
   
elseif (isa(ins, instclass))
   outs = ins;
else
   outs.v1 = squeeze(ins.vel(:,1,:));
   outs.v2 = squeeze(ins.vel(:,2,:));
   outs.v3 = squeeze(ins.vel(:,3,:));
   outs.v4 = squeeze(ins.vel(:,4,:));
   
   outs.a1 = squeeze(ins.amp(:,1,:));
   outs.a2 = squeeze(ins.amp(:,2,:));
   outs.a3 = squeeze(ins.amp(:,3,:));
   outs.a4 = squeeze(ins.amp(:,4,:));
   
   outs.sw1 = squeeze(ins.sw(:,1,:));
   outs.sw2 = squeeze(ins.sw(:,2,:));
   outs.sw3 = squeeze(ins.sw(:,3,:));
   outs.sw4 = squeeze(ins.sw(:,4,:));
   
   outs.heading      =  ins.heading;
   outs.dday         =  ins.dday;
   outs.temperature  =  ins.temperature;

   outs  =  class(outs, instclass);
end