function default(varargin)
param = [varargin{:} ';'];
ind = find(param=='=');
stmt = 'if ~exist(''%s'',''var'');%s;end';
str = sprintf(stmt,param(1:(ind(1)-1)),[varargin{:}]);
evalin('caller', str);
end
Example use
default x=2
Subscribe to:
Post Comments (Atom)
Be human
The biggest mistake repeated throughout history has always been people in power thinking they have the right to harm the innocent for what t...
-
Run following command in js console if you want make web sites audible with a click document.getElementsByTagName("p")].map(p =...
-
Real Time Transcription: In TV channels I realize that text is a little bit coming late after the speech. So , I think they are using...
-
"We introduce a new type of foundational model for parsing human anatomy in medical images that works for different modalities. It supp...
No comments:
Post a Comment