Skip to content
Snippets Groups Projects
Select Git revision
  • c916c4c1a668b53acae1064557c954d880a96c97
  • trunk
  • RELEASE_6_5_DRIVEDB
  • RELEASE_6_6_DRIVEDB
  • RELEASE_7_0_DRIVEDB
  • RELEASE_7_2_DRIVEDB
  • RELEASE_7_3_DRIVEDB
  • RELEASE_6_0_DRIVEDB
  • RELEASE_6_1_DRIVEDB
  • RELEASE_6_2_DRIVEDB
  • RELEASE_6_3_DRIVEDB
  • RELEASE_6_4_DRIVEDB
  • tags/RELEASE_7_4
  • tags/RELEASE_7_3
  • RELEASE_5_41_DRIVEDB
  • RELEASE_5_42_DRIVEDB
  • RELEASE_5_43_DRIVEDB
  • tags/RELEASE_7_2
  • tags/RELEASE_7_1
  • tags/RELEASE_7_0
  • RELEASE_5_40_DRIVEDB
21 results

modules

Blame
  • FT_example5.m 1.00 KiB
    
    % Example file for using SimTools with Finesse
    
    clear all;
    
    % name of kat file which contains 'blocks'
    inname='testconsts.kat';
    
    % read in block from testblock.kat
    block=FT_read_blocks_from_file(inname);
    myblock=FT_copy_block(block,'constants');
    
    disp('----------------------------------------------------------');
    % print reflectivies 
    r1=FT_read_kat_constant(myblock,'Rm1');
    r2=FT_read_kat_constant(myblock,'Rm2');
    disp(sprintf('Reflectivities of m1 and m2: %f %f',r1,r2));
    
    % now we change the reflectivity for one of m
    myblock=FT_write_kat_constant(myblock,'Rm1',0.7);
    
    %to check we print the block again
    disp('----------------------------------------------------------');
    disp('block of constants after changing Rm1:');
    FT_print_block(myblock,'constants');
    
    disp('----------------------------------------------------------');
    disp('creating a tmp block from lines 1-4 of the constants');
    newblock=FT_create_new_block('tmp');
    [newblock]=FT_copy_lines_block_to_block(myblock,newblock,1:4);
    FT_print_block(newblock,'tmp');