plotbeam.m

来自「The Finite Element Method Usign MATLAB.p」· M 代码 · 共 27 行

M
27
字号
function plotbar;
include_flags;

% check if user requested to plot the beam 
if strcmpi(plot_beam,'yes')==1;  
    for i = 1:nel
        XX = [x(IEN(1,i)) x(IEN(2,i))  x(IEN(1,i)) ];
        YY = [y(IEN(1,i)) y(IEN(2,i))  y(IEN(1,i)) ];        
        line(XX,YY);hold on;       
         line(XX,-YY);hold on;
        plot(XX,YY , '+r');  
        
        % check if user requested to plot the global node numbering 
        if strcmpi(plot_nod,'yes')==1;   
            text(XX(1),YY(1),sprintf('%0.5g',IEN(1,i)));
            text(XX(2),YY(2),sprintf('%0.5g',IEN(2,i)));
           
        end
    end
title('Bar Plot');
end

% print mesh parameters
fprintf(1,'  Beam Parameters \n');
fprintf(1,'No. of Elements  %d \n',nel);
fprintf(1,'No. of Nodes     %d \n',nnp);
fprintf(1,'No. of Equations %d \n\n',neq);

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?