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:
Posts (Atom)
Be Human
This is my prompt to the humans out there: Publication for the sake of publication, architecture for the sake of architecture, and agents fo...
-
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...
-
Bilimin degisik alanlarinda hayal kurmaktan kendimi alamiyorum, cam merceklerle kumu eritip tekrar mercek uretme, havadan carbonu cekip elma...