function drawflex(Bars,Nodes,Flexcol,respDOF,nodenum)
%
%  Name: drawflex
% 
%  Usage: drawflex(Bars,Nodes,Flexcol,respDOF,nodenum)
% 
%   Description:
%	Draws displaced mode shape of mode number 'nmod'

%  Version SWD960801
%
%  Author(s): Scott W. Doebling, doebling@lanl.gov
%
%  Institution: Los Alamos National Laboratory,
%		ESA-EA
%
%  Copyright (c) 1996, The Regents of the University
%     	of California. (See top level of code for
%	full copyright statement.)

%
%  Return Error if No Modes
%

Nodes_def = Nodes;

%
%
%  Determine 'Nodes' for displaced geometry
%
%

%
%  Loop over each entry in respDOF
%

for i = 1:size(respDOF,1),

%
%   Pull out the location, dir. magnitude, and dir. sign
%

    nloc = respDOF(i,1);
    ndirmag = abs(respDOF(i,2));
    ndirsign = sign(respDOF(i,2));

    %nscale = 0.5 / max(abs(Flexcol)) ;

    nscale = 1;

%
%   Find the Node which has this location
%

    rnode = find(Nodes(:,1) == nloc);
    if isempty(rnode),
        disp(['ERROR: DRAWMODES -- Node #',num2str(nloc),' in respDOF but not in Nodes'])
    end

%
%   Make the appropriate change to this Node's Location
%

    Nodes_def(rnode,ndirmag+1) =  Nodes(rnode,ndirmag+1) + Flexcol(i)*nscale;

end

%
%   Draw the deformed geometry
%

cla

drawbars(Bars,Nodes_def,0,gca,[1 1 0],'-')

view(30,330)

title('Flexibility Shape')

ht = text(Nodes(nodenum,2),Nodes(nodenum,3),Nodes(nodenum,4),num2str(Nodes(nodenum,1)));

set(ht,'horiz','center')
return
