Skip to content

struct_names.m

Basic Information

  PURPOSE:  Returns names of all variables and substructures within structure

  SYNTAX:
         [var_names, str_names]= struct_names(struc);  Normal Execution

  INPUT: <default>
     struc  structure object to find internal variable and structure names

  OUTPUT:
     var_names  full name of all variables in structure (ex. eq.GEQDSK.PSIRZ)
     str_names  full name of all substructures (ex. eq.GEQDSK)

  NOTE: TO GET ALL VARIABLES IN STRUCTURE TO WORKSPACE see struct_to_ws_all

  NOTE: Uses Recursive execution of struct_names to get all variables and structures
        in recursive operation is includes additional inputs:
        [var_names, str_names]= struct_names(struc, var_names, str_names, pre_name);
        where:
        var_names   input var_names to append output
        str_names   input str_names to append output
        pre_name    is name of previous structure to prepend on str_names

Dependencies