?? ps.m
字號:
function theResult = ps(theHandle)% ps/ps -- Constructor for "ps" class.% ps(theHandle) attaches theHandle to a new "ps"% object, unless the handle is already associated% with such an object. In either case, the object% itself is returned. The default graphics entity% is a new figure named "PS".% ps(aPSObject) returns the handle associated% with the given "ps" object.% Also see: "help ps_test". % Copyright (C) 1999 Dr. Charles R. Denham, ZYDECO.% All Rights Reserved.% Disclosure without explicit written consent from the% copyright owner does not constitute publication. % Version of 09-Dec-1999 00:12:19.% Updated 09-Dec-1999 05:26:41.if nargout < 1 & nargin < 1 setdef(mfilename) returnendif nargout > 0, theResult = []; endif nargin < 1 help(mfilename) theHandle = figure('Name', 'PS');end% Convert existing handle to "ps" object.switch class(theHandle)case 'double' if ishandle(theHandle) u = get(theHandle, 'UserData'); if isstruct(u) & isfield(u, 'ps_Self') theSelf = u.ps_Self; if isa(theSelf, 'ps') self = theSelf; if nargout > 0 theResult = self; else assignin('caller', 'ans', self) end return end end endend% Convert existing "ps" object to its handle.if isa(theHandle, 'ps') self = theHandle; theHandle = self.itsHandle; if nargout > 0 theResult = theHandle; else assignin('caller', 'ans', theHandle) end returnend% Create a new "ps" object. theStruct.itsHandle = [];self = class(theStruct, 'ps');self.itsHandle = theHandle;% Note names of the key elements: "ps_Self" and "ps_Data".% These appear also in "isps()" and "ps/data()". Make% sure they are used consistently throughout.psbind(self)if nargout > 0 theResult = self;else assignin('caller', 'ans', self)end
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -