简要介绍资料的主要内容,以获得更多的关注
ze(A);
% Get a value for scaling:
sval=max([max(max(abs(A))),max(abs(b))])*1e5*eps;
% Main iteration
done=0;
while ~done
% Get the basis A_B matrix and factor it
AB=A(:,bfs.B);
[L,U]=lu(AB);
% Gather the indices of the nonbasic variables
N=[bfs.N1,bfs.N2,bfs.N3];
n1=length(bfs.N1);
n2=length(bfs.N2);
n3=length(bfs.N3);
% Step 1: Compute the dual vector y and the vector of
% prices
y=L'\(U'\c(bfs.B));
cbar=c(N)-A(:,N)'*y;
% Now choose the entering variable
% First identify all of the candidates:
i1=find(cbar(1:n1)>sval);
i2=find(cbar(n1+1:n1+n2)<-sval);
i3=find(abs(cbar(n1+n2+1:n1+n2+n3))>sval);
% If there are no candidates, the current BFS is optimal
if isempty(i1)&isempty(i2)&isempty(i3)
done=1;
break;
end
% If there are candidates, choose the entering variable by
% the smallest-subscript rule.
pc=min([bfs.N1(i1),bfs.N2(i2),bfs.N3(i3)]);
if isempty(bfs.N1)
i1=[];
else
i1=find(bfs.N1==pc);
end
if ~isempty(i1)
Nflag=1;
pc=bfs.N1(i1);
else
if isempty(bfs.N2)
i2=[];
else
i2=find(bfs.N2==pc);
end
if ~isempty(i2);
Nflag=2;
pc=bfs.N2(i2);
else
if isempty(bfs.N3)
i3=[];
else
i3=find(bfs.N3==pc);
end
if ~isempty(i3)
if cbar(n1+n2+i3)>0
Nflag=3;
else
Nflag=4;
end
pc=bfs.N3(i3);
else
error('Inconsistency in choice of entering variable')
end
end
end
% Step 2: Find the changes in the basic variables and choose the
% leaving variable
d=U\(L\A(:,pc));
% Identify the candidates for leaving variables
% First look among the basic variables
pr=[];
len=0;
for i=1:m
if (d(i)>sval & (Nflag==1|Nflag==3)) | ...
(d(i)<-sval & (Nflag==2|Nflag==4))
if l(bfs.B(i))>-inf
len=len+1;
pr(len,:)=[i,abs((bfs.x(bfs.B(i))-l(bfs.B(i)))/d(i))];
end
elseif (d(i)>sval & (Nflag==2|Nflag==4)) | ...
(d(i)<-sval & (Nflag==1|Nflag==3))
if u(bfs.B(i))<inf
len=len+1;
pr(len,:)=[i,abs((bfs.x(bfs.B(i))-u(bfs.B(i)))/d(i))];
end
end
end
% Now look at the entering variable itself
if Nflag==1
% The entering variable is increasing
if u(pc)<inf
len=len+1;
pr(len,:)=[0,u(pc)-bfs.x(pc)];
end
elseif Nflag==2
% The entering variable is decreasing
if l(pc)>-inf
len=len+1;
pr(len,:)=[0,bfs.x(pc)-l(pc)];
end
end
if len==0
% No variable must leave the basis, so the LP is unbounded
done=1;
tflag=1;
return
MATLAB 有限元计算程序3_工学_高等教育_教育专区。有限元 matlab 程序设计function exam7_1 % 本程序为第七章的第一个算例,采用薄板矩形单元计算矩形板的弯曲 ...
关键词:力学matlab有限元有限单元法实例 同系列文档 朝鲜历届领导人资料 朝鲜现状 为什么南北朝鲜会分裂 朝鲜的近代史 matlab有限元计算程序5...
matlab计算有限元程序 (4) 2页 免费 MATLAB 有限元计算程序3 6页 2财富值 matlab计算有限元程序 (3) 1页 免费 MATLAB 有限元计算程序1 4页 2财富值...
matlab有限元法计算分析程序编写_机械/仪表_工程科技_专业资料。matlab应用有限元法计算分析程序编写 结构参数输入,包括 1)节点坐标值 2)单元类型以及连接信息 3)...
有限元 matlab 程序设计有限元 matlab 程序设计隐藏>> function exam8_1 % 本程序为第八章的第一个算例,采用平面梁单元计算两铰抛物线拱的自由振动特性 % ...
MATLAB 有限元计算程序3 6页 2财富值搜你所想,读你所爱 拒绝盗版,营造绿色文库 如要投诉违规内容,请到百度文库投诉中心;如要提出功能问题或意见建议,请点击...
Matlab 有限元法计算分析程序编写_交通运输_工程科技_专业资料。Matlab 有限元法计算分析程序编写有限元法计算分析程序编写 结构参数输入,包括 1)节点坐标值 2)...
梁单元的有限元计算程序%此程序计算杆的总刚度矩阵及节点位移,分五步完成:输入各单元数据、计算单元刚度矩阵 %组集总...
Matlab与有限元程序设计_工学_高等教育_教育专区。Matlab与有限元程序设计...编制的 聚合 物 口 模挤 出计 算机模 有限元程序设计 的方 法在 开 始...
热门文档