>>[a0,b0]=gdat
a0 =

                t: []
             data: []
              dim: []
         dimunits: []
        error_bar: []
             shot: []
          machine: []
     gdat_keyword: {'kwd1'  'kwd2'}
      gdat_params: [1x1 struct]
    data_fullpath: []
        gdat_call: 'gdat;'


b0 =

    data_request: ''
         machine: 'tcv'
          doplot: 0

          
>>[a1, b1]=gdat(48836,'ip','Opt1',123,'Doplot',1,'opt2','Abc')
a1 =

                t: []
             data: []
              dim: []
         dimunits: []
        error_bar: []
             shot: 48836
          machine: []
     gdat_keyword: []
      gdat_params: [1x1 struct]
    data_fullpath: []
        gdat_call: 'gdat(48836,'ip','Opt1',123,'Doplot',1,'opt2','Abc');'

b1 =

    data_request: 'ip'
         machine: 'tcv'
          doplot: 1
            opt1: 123
            opt2: 'abc'

>> b1.newopt=[1 2 34];
>> [a2 b2]=gdat(48836,b1);

the "calling string can be used to rerun the call:

>> eval(['[a3 b3]=' a2.gdat_call]);

a3 is the same as a2
