?? setr.m
字號:
function M = setr(recordvar, fieldname, fieldvar)% RECVAR, A package for new data types in Matlab 4. % (c) FOA 1997. See the file rvright.m for copyright notice.%% function M = setr(recordvar, fieldname, fieldvar)%% Creates record variables and creates and changes the contents of fields.% Matlab 5 compatibility version.%% M RecVarT% recordvar RecVarT or []% fieldname StringT% fieldvar Any type%% Ex:% A = setr(A, 'frequency', 2800); % % Sets the field 'frequency' to the value 2800 in the record variable 'A'.%% If 'recordvar' is not an record variable an error message is issued.% To create a new record variable use 'recordvar' = [].% Start : 970820 Svante Bj鰎klund (svabj).% Latest change: $Date: 1997/12/08 15:49:45 $ $Author: svabj $.% $Revision: 1.2 $% *****************************************************************************%M = matvar('setr', recordvar, fieldname, fieldvar);if (isstruct(recordvar) | isempty(recordvar)) M = setfield(recordvar, fieldname, fieldvar);else error('Can not change a matrix, which is not a record variable.') % Note, Matlab can do this but RECVAR with Matlab 4 can not.end%if
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -