@smax如何使用啊,具体的
@smax如何使用啊,具体的在矩阵中的使用!!!!!!! 大家快点帮忙吧 本帖最后由 qlb061 于 2012-7-28 22:52 编辑摘自Lingo users manul:
@SMAX( X1, X2,..., XN)
Returns the maximum value of X1, X2, ..., and XN.
@SMIN( X1, X2,..., XN)
Returns the minimum value of X1, X2, ..., and XN.
The @MIN and @MAX functions are used to find the minimum and maximum of an expression over members of a set.
建议使用集合函数@min, @maxMODEL:
SETS:
ROW/R1..R3/;
COLUM/C1..C3/;
RXC(ROW,COLUM):V;
ENDSETS
DATA:
@TEXT()=@WRITE("the maximal value of v is: ",@MAX(RXC:V));
ENDDATA
CALC:
@FOR(RXC(I,J):V(I,J)=I+J);
ENDCALC
END
the maximal value of v is: 6
Variable Value
V( R1, C1) 2.000000
V( R1, C2) 3.000000
V( R1, C3) 4.000000
V( R2, C1) 3.000000
V( R2, C2) 4.000000
V( R2, C3) 5.000000
V( R3, C1) 4.000000
V( R3, C2) 5.000000
V( R3, C3) 6.000000
就是楼上的说法 qlb061 发表于 2012-7-28 21:16 static/image/common/back.gif
摘自Lingo users manul:
@SMAX( X1, X2,..., XN)
Returns the maximum value of X1, X2, ..., and XN.
谢谢!!!!!!!!! 不错不错,收货哦。。。。。。。。。。。。 min = @smax(f(1),f(2),f(3));
页:
[1]