# 数学建模实录（1）

Let's begin to study mathematical modeling and mathematical experiments,begin to learn matlab software.

 成员 特长 吕小苏(女) 写作、计算机编程 刘京城 思考问题，发现问题、写作 计算机编程、思考

?

?

?

Source Code:

?

%**********************************************************

%? This is Help Information About FindMinParam() Function.

%?????????? Find the min number in the matrix.

%?????????? Designer:?? 孤剑

%?????????????????????? Liu Jingcheng

%?????????????????????? Lv XiaoShu

%?????????? Verison:1.0.0? Finish Date:27/08/2004

%????? Copyright (C) By 孤剑 ,Mr Liu,Miss Lv

%?????

%?? Usage:

%?????? FindMinParam(a,iCount)

%?????????????????? a is matrix.

%?????????????????? iCount is Counter.

%?? Waring:

%?????? When used function ,the matrix will be changed.

%

%?? 孤剑 Website:http://blog.csdn.net/alonesword/

%***********************************************************

a=[inf,5,6,17;10,inf,2,20;8,16,inf,8;6,5,21,inf];

Succ=0;

lng=length(a);

rst=zeros(3,lng);

for Count=1:iCount

??? for RowCount=1:lng;

? ??????for ColCount=1:lng;

?????? ??????? if (min(min(a))==a(RowCount,ColCount));

%Find the Row and Col of the min number.

??????????????? tmpMin=min(min(a));????????????????????

%Save the min number in tmpMin.

????????????? ??????? tmpRow=RowCount;??????????????????????

%Save min number's Row in tmpRow.

????????????? ??????? tmpCol=ColCount;???????????????????????

%Save min number's Col in tmpCol.

??????????????? a(RowCount,:)=inf;?????????????????????

%Change whole Rows of the min number to inf.

????????????? ??????? a(:,ColCount)=inf;?????? ???????????????

%Change whole Cols of the min number to inf.

??????????????? Succ=1;????????????????????????????????

%Flag to Successful find the min number.1 is true,0 is false.

??????????????? break;?????????????????????????????????

??????????? end;

? ??????end???? %End For

??????? if Succ==1?? %If successful to find the min number.Do ...

??????????? break;

??????? end;

??? end;

??? if Succ==1?????? %Save the result to the matrix rst.

??????? rst(1,Count)=tmpMin;

??????? rst(2,Count)=tmpRow;

??????? rst(3,Count)=tmpCol;

??? end;

end;

rst????????????????? %Display the result.

?

Visio还是比较生疏。

?

?

?

Ps：随后将此次学校出的选拔题目贴上。

• 本文已收录于以下专栏：

举报原因： 您举报文章：数学建模实录（1） 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)