# FIRST EXAMPLE : read a table and insert a value into the cell, then save the updated table # read file contents into tabCoupler clear; tabCoupler = lookupread( "coupler_map.ixml" ); # print values ?toscript( tabCoupler ); # create new association to be inserted into tabCoupler association=struct; association.design=cell(1); association.design{1}=struct; association.design{1}.name='gap'; association.design{1}.value=5e-007; association.extracted=cell(1); association.extracted{1}=struct; association.extracted{1}.name='coupling_length'; association.extracted{1}.value=9e-006; # insert association at last position tabCoupler{1}.association = insert( tabCoupler{1}.association, association, 2 ); # print updated values ?toscript(tabCoupler); # write into new file lookupwrite( "coupler_map.ixml", tabCoupler ); # SECOND EXAMPLE : insert value directly into existing table clear; # create design parameter design=cell(1); design{1}=struct; design{1}.name='gap'; design{1}.value=6e-007; # create extracted parameter extracted=cell(1); extracted{1}=struct; extracted{1}.name='coupling_length'; extracted{1}.value=9.9e-006; # append to existing table lookupappend( "coupler_map.ixml", "coupler_extracted", design, extracted ); # print contents ?toscript( lookupread( "coupler_map.ixml" ) );