bar1d.m
来自「The Finite Element Method Usign MATLAB.p」· M 代码 · 共 37 行
M
37 行
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 1D Bar (Chapter 5) %
% Haim Waisman, Renssealer %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
clear all;
close all;
% include global variables
include_flags;
% Preprocessing
[K,f,d] = preprocessor;
% Assembly
for e = 1:nel
[ke,fe] = barelem(e);
[K, f] = assembly(K,f,e,ke,fe);
end
% Add boundary force vector
f = naturalBC(f);
% Solution
[d,f_E] = solvedr(K,f,d);
% Postprocessing
postprocessor(d);
% plot the exact solution of stresses
ExactSolution;
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?