📄 e272.m
字号:
%-----------------------------------------------------------------------
% Example 2.7.2: Planar Truss
%-----------------------------------------------------------------------
% Initialize A
clc % clear screen
clear % clear variables
n = 8; % number of forces
theta = pi/3; % joint angle A
phi = pi/6; % joint angle D
g = [0 0 -250 0 0 1500 0 0]'; % load forces
A = zeros (n,n);
% Compute A
fprintf ('Example 2.7.2: Planar Truss\n');
A(1,1) = cos(theta);
A(2,1) = sin(theta);
A(3,1) = -cos(theta);
A(4,1) = -sin(theta);
A(3,4) = cos(phi);
A(4,4) = -sin(phi);
A(8,4) = sin(phi);
A(7,4) = -cos(phi);
A(1,2) = 1; A(2,7) = 1; A(5,5) = 1; A(6,3) = 1; A(8,8) = 1;
A(1,6) = -1; A(4,3) = -1; A(5,2) = -1; A(7,5) = -1;
show ('A',A)
show ('g',g)
% Find forces
show ('K(A)',condnum(A,0))
f = gauss (A,g);
show ('f',f)
show ('||r(f)||',residual(A,g,f))
%-----------------------------------------------------------------------
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -