有個(gè)分段函數(shù):
| x + y, x>=0 and y >=0
| x^2 + y, x>=0 and y<0
f(x,y) = | x + y^2, x <0 and y >=0
| x^2 + y^2, x<0 and y <0
如果參數(shù)x,y只是單個(gè)值,這樣用if語(yǔ)句就可以處理。
這是MATLAB幫助中的說(shuō)明,我的MATLAB 2009b。
Remove all existing instances of flops. With the incorporation of LAPACK in MATLAB version 6, counting floating-point operations is no longer practical.