1、waitbar();
example
{
h = waitbar(0,'Please wait ... ');
for m=1:1:100
waitbar(m/framenumber,h);
end
}
2、条件分支在运算中的运用:
f = (1.5*absx3 - 2.5*absx2 + 1) .* (absx <= 1) + ...
(-0.5*absx3 + 2.5*absx2 - 4*absx + 2) .* ...
((1 < absx) & (absx <= 2));
3、bsxfun()的应用
功能:binary singleton expansion; 还可以作矩阵的运算;下面的例子实现矩阵A各元素减去mean(A);还有很多其他function handle(help bsxfun),或者自己写的function也可以用。
example
{
A = magic(5);
A = bsxfun(@minus, A, mean(A));
}