Contents     Functions     Index     Previous Next     PDF

stack_get,stack_set,stack_rm



Purpose

Stack handling functions.

Syntax
[StackRows,index]=stack_get(model,typ);
[StackRows,index]=stack_get(model,typ,name);
Up=stack_set(model,typ,name,val)
Up=stack_rm(model,typ,name);
Up=stack_rm(model,typ);
Up=stack_rm(model,'',name);
Description

The .Stack field is used to store a variety of information, in a N by 3 cell array with each row of the form {'type','name',val} (see section 7.6 or section 7.7 for example). The purpose of this cell array is to deal with an unordered set of data entries which can be classified by type and name.

Since sorting can be done by name only, names should all be distinct although if the types are different this is not an obligation.

Syntax
Case.Stack={'DofSet','Point accel',[4.03;55.03];
            'DofLoad','Force',[2.03];
            'SensDof','Sensors',[4 55 30]'+.03};
% Replace first entry
Case=stack_set(Case,'DofSet','Point accel',[4.03;55.03;2.03]);
Case.Stack
% Add new entry
Case=stack_set(Case,'DofSet','P2',[4.03]);
Case.Stack
% Remove entry
Case=stack_rm(Case,'','Sensors');Case.Stack
% Get DofSet entries
[Val,ind]=stack_get(Case,'DofSet')
% Access value
Case.Stack{ind(1),3}
Val{1,3}
SDT provides simplified access to stacks in feplot (see section 5.1.2) and iiplot figures (see section 3.1.2). cf.Stack{'Name'} can the be used for direct access to the stack, and cf.CStack{'Name'} for access to FEM model case stacks.

©1991-2007 by SDTools
Previous Up Next