定义永久变量/局部静态变量(看意义翻译,原意应该是持续的、持续的)。
Syntax语法
持续x y z
说明,说明
definesX,y,andZas variables that are
localtothefunctioninwhichtheyaredeclared; yet their values
areretainedinmemorybetweencallstothefunction.persistent
variablesaresimilartoglobalvariablesbecausethematlab
softwarecreatespermanentstorageforboth.theydifferfrom
globalvariablesinthatpersistentvariablesareknownonlytothe
functioninwhichtheyaredeclared.thispreventspersistent
variablesfrombeingchangedbyotherfunctionsorfromthematlab
命令行
永久变址存储器
memoryorwhenthem-fileischanged.tokeepanm-file in memory
until矩阵队列,use mlock。
ifthepersistentvariabledoesnotexistthefirsttimeyouissue
thepersistentstatement,it
is初始化至the empty matrix。
itisanerrortodeclareavariablepersistentifavariablewith
thesamenameexistsinthecurrentworkspace.matlabalsoerrors
ifyoudeclareanyofafunction ' sinputoroutputargumentsas
persistentwithinthatsamefunction.for example,the following
永久