MATLAB Function Reference |
Syntax
whileexpression
statements
end
Description
while
可重覆執行指令若干次。當 expression
的實數部分都不是0時,指令就會被執行。expression
通常是下列格式
expression
rop
expression
rop
為 ==, <, >, <=, >=, or ~=.
Examples
eps
is a tolerance used to determine such things as near singularity and rank.
起始值是machine epsilon, 為 1.0
到比下一個比1.0略大而且可以在你機器上表示出來的浮點數的差距。 可利用 while
廻圈來求之:
eps = 1; while (1+eps) > 1 eps = eps/2; end eps = eps*2
See Also
all
, any
, break
, end
, for
, if
, return
, switch
which | whitebg |