100+ results for 'Inputfile: lang:MATLAB'
Not the results you expected?
legend.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 200 lines
ft_datatype_freq.m (http://open-realtime-fmri.googlecode.com/svn/trunk/) MATLAB · 98 lines
testCalCC.m (http://horwitzlab.googlecode.com/svn/) MATLAB · 112 lines
subplot.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 186 lines
dXPMDHID.m (http://dotsx.googlecode.com/svn/trunk/) MATLAB · 1 lines
1 function [p_, attributes_, batchMethods_] = dXPMDHID(num_objects) % function [p_, attributes_, batchMethods_] = dXPMDHID(num_objects) % % Constructor method for class dXPMDHID % works with PMD-1208FS/USB-1208FS USB/HID digital-analog converter box % % Input: % num_objects ... ignored -- always creates just one % % Output: % p_ ... created object % attributes_ ... default object attributes % batchMethods_ ... methods that can be run in a batch (e.g., draw) % dependencies_ ... not used % Copyright 2005 by Joshua I. Gold % University of Pennsylvania global ROOT_STRUCT % look for mex function available = exist('HIDx'); % return empty matrix if not available, which % will automatically remove PMDHID devices from the ui queue % if called from rInit if isfield(ROOT_STRUCT, 'dXPMDHID') || ~available p_ = []; attributes_ = []; batchMethods_ = []; return end % how to find compatible device % the master device of the PMD-1208FS/USB-1208FS composite device HIDCriteria.manufacturer = 'MCC'; HIDCriteria.vendorID = 2523; HIDCriteria.productID = 130; HIDCriteria.totalElements = 89; % default channelizer: make one useless channel HIDChannelizer.gain = 1; HIDChannelizer.offset = 0; HIDChannelizer.high = nan; HIDChannelizer.low = nan; HIDChannelizer.delta = 0; HIDChannelizer.freq = 1; [resetReport, resetID] = formatPMDReport('Reset'); % default object attributes attributes = { ... % name type ranges(?) default 'available', 'boolean', [], available; ... 'active', 'boolean', [], false; ... 'FIRAdataType', 'string', [], 'PMDHIDData'; ... 'HIDClass', 'string', [], 'dXPMDHID'; ... 'HIDCriteria', 'struct', [], HIDCriteria; ... 'HIDChannelizer','struct', [], HIDChannelizer; ... 'HIDIndex', 'scalar', [], nan; ... 'HIDDeviceInfo','struct', [], []; ... 'HIDElementsInfo','struct', [], []; ... 'resetID', 'scalar', [], resetID; ... 'resetReport', 'uint8', [], resetReport;... 'loadID', 'scalar', [], []; ... 'loadReport', 'uint8', [], []; ... 'startID', 'scalar', [], []; ... 'startReport', 'uint8', [], []; ... 'stopID', 'scalar', [], []; ... 'stopReport', 'uint8', [], []; ... 'mappings', 'cell', [], []; ... 'startScanTime','auto', [], 0; ... 'offsetTime', 'auto', [], 0; ... 'default', 'auto', [], []; ... 'other', 'auto', [], []; ... 'checkList', 'auto', [], []; ... 'checkRet', 'auto', [], []; ... 'values', 'auto', [], []; ... 'recentVal', 'auto', [], 1}; % make an array of objects from structs made from the attributes p_ = class(cell2struct(attributes(:,4), attributes(:,1), 1), 'dXPMDHID'); % return the attributes, if necessary if nargout > 1 attributes_ = attributes; end % return list of batch methods if nargout > 2 batchMethods_ = {'reset', 'saveToFIRA', 'root', 'getJump'}; end
curlyh.m (http://slac-lucretia.googlecode.com/svn/trunk/) MATLAB · 40 lines
gui_active.m (http://slac-lucretia.googlecode.com/svn/trunk/) MATLAB · 39 lines
1 function ret = gui_active(optional_input)
2 %
3 % gui_active - used to implement an abort function in a GUI
20 if (nargin > 0)
21 if (optional_input == -1)
22 drawnow;
23 if (~is_active)
26 else
27 prev_is_active = is_active;
28 is_active = optional_input;
29 if ((prev_is_active > 0) & (is_active == 0))
30 disp('operation aborted');
changeP.m (http://atf2flightsim.googlecode.com/svn/trunk/) MATLAB · 95 lines
help_coord.m (http://atf2flightsim.googlecode.com/svn/trunk/) MATLAB · 74 lines
8 %
9 % HELP_COORD('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in HELP_COORD.M with the given input arguments.
11 %
12 % HELP_COORD('Property','Value',...) creates a new HELP_COORD or raises the
14 % applied to the GUI before help_coord_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to help_coord_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
zp2sos.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 137 lines
irsa_jitsp.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 125 lines
model.m (https://code.google.com/p/bionetgen/) MATLAB · 273 lines
12 % = model( timepoints, species_init, parameters, suppress_plot )
13 %
14 % INPUTS:
15 % -------
16 % species_init : row vector of 10 initial species populations.
19 % suppress_plot : 0 if a plot is desired (default), 1 if plot is suppressed.
20 %
21 % Note: to specify default value for an input argument, pass the empty array.
22 %
23 % OUTPUTS:
36 %% Process input arguments
38 % define any missing arguments
test_nc_varput.m (http://m--pack.googlecode.com/svn/trunk/) MATLAB · 635 lines
296 input_data = [1:24];
297 input_data = reshape(input_data,6,4);
298 status = nc_varput ( ncfile, 'test_2D', input_data );
320 input_data = [1:20];
321 input_data = reshape(input_data,5,4);
322 status = nc_varput ( ncfile, 'test_2D', input_data, [0 0], [5 4] );
344 input_data = [1:20] - 5;
345 input_data = reshape(input_data,5,4);
346 status = nc_varput ( ncfile, 'test_2D', input_data, [1 0], [5 4] );
368 input_data = [1:6];
369 input_data = reshape(input_data,3,2);
370 status = nc_varput ( ncfile, 'test_2D', input_data, [0 0], [3 2], [2 2] );
393 input_data = [1:28];
394 input_data = reshape(input_data,7,4);
395 status = nc_varput ( ncfile, 'test_2D', input_data );
test_get_var_bad_param_datatype.m (http://m--pack.googlecode.com/svn/trunk/) MATLAB · 2459 lines
test_put_var_bad_param_datatype.m (http://m--pack.googlecode.com/svn/trunk/) MATLAB · 2462 lines
198 input_data = [1:1:len_y*len_x];
199 input_data = reshape ( input_data, len_y, len_x );
201 status = mexnc ( 'put_var_double', ncid, varid, input_data' );
213 testid = 'Test 1';
214 try
215 [status] = mexnc ( 'put_var1_double', 'ncid', varid, [0 0], input_data' );
216 error_condition = 1;
217 end
229 testid = 'Test 2';
230 try
231 [status] = mexnc ( 'put_var1_float', 'ncid', varid, [0 0], input_data' );
232 error_condition = 1;
233 end
245 testid = 'Test 3';
246 try
247 [status] = mexnc ( 'put_var1_int', 'ncid', varid, [0 0], input_data' );
248 error_condition = 1;
249 end
AnalisisRegresion.m (http://tesis-matlab-estanques.googlecode.com/svn/trunk/) MATLAB · 813 lines
8 %
9 % ANALISISREGRESION('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in ANALISISREGRESION.M with the given input arguments.
11 %
12 % ANALISISREGRESION('Property','Value',...) creates a new ANALISISREGRESION or raises the
14 % applied to the GUI before AnalisisRegresion_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to AnalisisRegresion_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
plx_ad.m (http://horwitzlab.googlecode.com/svn/) MATLAB · 135 lines
whip_eig.m (git://github.com/moorepants/PhysicalParameters.git) MATLAB · 88 lines
wiremeasGui.m (http://atf2flightsim.googlecode.com/svn/trunk/) MATLAB · 656 lines
8 %
9 % WIREMEASGUI('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in WIREMEASGUI.M with the given input arguments.
11 %
12 % WIREMEASGUI('Property','Value',...) creates a new WIREMEASGUI or raises the
14 % applied to the GUI before wiremeasGui_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to wiremeasGui_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
reference_voltages.m (http://atf2flightsim.googlecode.com/svn/trunk/) MATLAB · 821 lines
8 %
9 % REFERENCE_VOLTAGES('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in REFERENCE_VOLTAGES.M with the given input arguments.
11 %
12 % REFERENCE_VOLTAGES('Property','Value',...) creates a new REFERENCE_VOLTAGES or raises the
14 % applied to the GUI before reference_voltages_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to reference_voltages_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
95 if isnan(temp)
96 set(hObject, 'String', 0);
97 errordlg('Input must be a number','Error');
98 end
99 handles.rv(1,3) = temp;
cal_settings.m (http://atf2flightsim.googlecode.com/svn/trunk/) MATLAB · 723 lines
8 %
9 % CAL_SETTINGS('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in CAL_SETTINGS.M with the given input arguments.
11 %
12 % CAL_SETTINGS('Property','Value',...) creates a new CAL_SETTINGS or raises the
14 % applied to the GUI before cal_settings_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to cal_settings_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
102 if isnan(temp)
103 set(hObject, 'String', 0);
104 errordlg('Input must be a number','Error');
105 end
106 handles.cal(1,2) = temp;
extDispersion_bpmSel.m (http://atf2flightsim.googlecode.com/svn/trunk/) MATLAB · 462 lines
8 %
9 % EXTDISPERSION_BPMSEL('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in EXTDISPERSION_BPMSEL.M with the given input arguments.
11 %
12 % EXTDISPERSION_BPMSEL('Property','Value',...) creates a new EXTDISPERSION_BPMSEL or raises the
14 % applied to the GUI before extDispersion_bpmSel_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to extDispersion_bpmSel_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
MonmerGUI.m (http://du-chem.googlecode.com/svn/trunk/) MATLAB · 1617 lines
8 %
9 % MONMERGUI('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in MONMERGUI.M with the given input arguments.
11 %
12 % MONMERGUI('Property','Value',...) creates a new MONMERGUI or raises the
14 % applied to the GUI before MonmerGUI_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to MonmerGUI_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
selenium-remoterunner.js
(http://datanucleus-appengine.googlecode.com/svn/trunk/)
JavaScript · 694 lines
✨ Summary
This JavaScript code is part of a Selenium WebDriver implementation, used to automate web browsers. It provides methods for simulating user interactions, such as keyboard and mouse events, and interacting with the browser’s native operating system. The code allows users to control the browser’s behavior, including key presses, releases, and movements, without directly manipulating HTML elements.
This JavaScript code is part of a Selenium WebDriver implementation, used to automate web browsers. It provides methods for simulating user interactions, such as keyboard and mouse events, and interacting with the browser’s native operating system. The code allows users to control the browser’s behavior, including key presses, releases, and movements, without directly manipulating HTML elements.
440 loggingForm.action = url;
441 loggingForm.target = "seleniumLoggingFrame";
442 var postedDataInput = document.createElement("input");
443 postedDataInput.type = "hidden";
444 postedDataInput.name = "postedData";
445 postedDataInput.value = dataToBePosted;
446 loggingForm.appendChild(postedDataInput);
447 document.body.appendChild(loggingForm);
448 loggingForm.submit();
583 Selenium.prototype.doAttachFile = function(fieldLocator,fileLocator) {
584 /**
585 * Sets a file input (upload) field to the file listed in fileLocator
586 *
587 * @param fieldLocator an <a href="#locators">element locator</a>
zielfunktionen.m (http://bohreroptimierung.googlecode.com/svn/trunk/) MATLAB · 411 lines
8 %
9 % ZIELFUNKTIONEN('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in ZIELFUNKTIONEN.M with the given input arguments.
11 %
12 % ZIELFUNKTIONEN('Property','Value',...) creates a new ZIELFUNKTIONEN or raises the
14 % applied to the GUI before zielfunktionen_OpeningFunction gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to zielfunktionen_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
gpibproto.m (https://code.google.com/p/ni-gpib-matlab-wrappers/) MATLAB · 180 lines
48 % extern int _stdcall ibdma ( int ud , int v );
49 fcns.name{fcnNum}='ibdma'; fcns.calltype{fcnNum}='stdcall'; fcns.LHS{fcnNum}='int32'; fcns.RHS{fcnNum}={'int32', 'int32'};fcnNum=fcnNum+1;
50 % extern int _stdcall ibexpert ( int ud , int option , void * Input , void * Output );
51 fcns.name{fcnNum}='ibexpert'; fcns.calltype{fcnNum}='stdcall'; fcns.LHS{fcnNum}='int32'; fcns.RHS{fcnNum}={'int32', 'int32', 'voidPtr', 'voidPtr'};fcnNum=fcnNum+1;
52 % extern int _stdcall ibeos ( int ud , int v );
Options.xaml.cs
(https://htchome.svn.codeplex.com/svn)
C# · 170 lines
✨ Summary
This C# code is for a Windows application’s options window, allowing users to configure settings such as autostart, enable glass, and language. It retrieves locale codes from a localization directory, updates registry values, and writes configuration files. The application also loads widget names into a list when the user clicks “Apply”.
This C# code is for a Windows application’s options window, allowing users to configure settings such as autostart, enable glass, and language. It retrieves locale codes from a localization directory, updates registry values, and writes configuration files. The application also loads widget names into a list when the user clicks “Apply”.
mdctv.m (http://aac-codec-matlab.googlecode.com/svn/) MATLAB · 49 lines
t2r.m (http://slac-lucretia.googlecode.com/svn/trunk/) MATLAB · 56 lines
ellipse.m (http://slac-lucretia.googlecode.com/svn/trunk/) MATLAB · 56 lines
gXCMDnolevers_hardware.m (http://dotsx.googlecode.com/svn/trunk/) MATLAB · 121 lines
11 %
12 % The simple_demo task also uses the dXkbHID hardware device for checking
13 % keyboard inputs, but that device is automatically activated and
14 % configured by rInit.
15 %
55 arg_dXsound = { ...
56 'mute', mute, ...
57 'rawSound', {'Coin.wav', 'AOL_Hurt.wav'}, ...% scan 4 analog inputs (vs. ground) at 1000Hz
58 'gain', {.5, 2}};
61 %%%FOR USING LEVERS
63 % scan 4 analog inputs (vs. ground) at 1000Hz
64 % % mode = 1 means +/-10V
65 % chans = 8:11;
rgbplot.m (https://plplot.svn.sourceforge.net/svnroot/plplot) MATLAB · 34 lines
Temperature.m (http://freesteamplus.googlecode.com/svn/trunk/) MATLAB · 742 lines
236 error(nargchk(4, 7, nargin, 'struct'))
237 if ((nargin > 4) && (nargin < 7))
238 error('Therm:nargchk:improperNumberOfInputs','Improper number of input arguments.')
239 end
240 if strcmpi(prop1,'t')
308 error(nargchk(4, 7, nargin, 'struct'))
309 if ((nargin > 4) && (nargin < 7))
310 error('Therm:nargchk:improperNumberOfInputs','Improper number of input arguments.')
311 end
312 if strcmpi(prop1,'t')
380 error(nargchk(4, 7, nargin, 'struct'))
381 if ((nargin > 4) && (nargin < 7))
382 error('Therm:nargchk:improperNumberOfInputs','Improper number of input arguments.')
383 end
384 if strcmpi(prop1,'t')
squareform.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 96 lines
MLP9_2_1.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 126 lines
72 mInput(:,1:nTestSets) = [];
73 mOutput(:,1:nTestSets) = [];
74 mTrainInput = mInput(:,1:nTrainSets);
75 mTrainOutput = mOutput(:,1:nTrainSets);
77 [mTrainInputN,cMeanInput,cStdInput] = prestd(mTrainInput);# standardize inputs
79 ## comments: there is no reason to standardize the outputs because we have only
82 # define the max and min inputs for each row
83 mMinMaxElements = min_max(mTrainInputN); % input matrix with (R x 2)...
85 ## define network
118 # % standardise input & output test data
119 [mTestInputN] = trastd(mTestInput,cMeanInput,cStdInput);
120 # % [mTestOutputN] = trastd(mTestOutput,cMeanOutput,cStdOutput);
121 # % define unused parameters to get E-variable of simulation
get_DR_corrs.m (http://slac-lucretia.googlecode.com/svn/trunk/) MATLAB · 165 lines
9 % Compute DR corrector currents (KL=BL/brho) from kicks
10 %
11 % INPUTs (opCode=1):
12 %
13 % opCode = 1 (I to KL conversion)
16 % fflag = (optional) if present and nonzero, fudge factors will be used
17 %
18 % INPUTs (opCode=2):
19 %
20 % opCode = 2 (KL to I conversion)
46 Ncorr=101;
48 % check input args
50 if (~exist('opCode','var'))
rc2ar.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 92 lines
bspderiv.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 68 lines
dbget.pro
(git://github.com/charleshull6/c_soft.git)
Prolog · 104 lines
✨ Summary
The DBGET function searches a database for entries containing specified values of a given item. It takes an item name, values to search for, and optional parameters such as listin, SILENT, and FULLSTRING. The function returns a vector of entry numbers where the desired item values are found, along with the number of matches.
The DBGET function searches a database for entries containing specified values of a given item. It takes an item name, values to search for, and optional parameters such as listin, SILENT, and FULLSTRING. The function returns a vector of entry numbers where the desired item values are found, along with the number of matches.
The DBGET function searches a database for entries containing specified values of a given item. It takes an item name, values to search for, and optional parameters such as listin, SILENT, and FULLSTRING. The function returns a vector of entry numbers where the desired item values are found, along with the number of matches.
The DBGET function searches a database for entries containing specified values of a given item. It takes an item name, values to search for, and optional parameters such as listin, SILENT, and FULLSTRING. The function returns a vector of entry numbers where the desired item values are found, along with the number of matches.
13 ; list = dbget( item, values, [ listin ], /SILENT, /FULLSTRING )
14 ;
15 ; INPUTS:
16 ; item - Item name or number
17 ; values - scalar or vector containing item values to search for.
18 ;
19 ; OPTIONAL INPUTS:
20 ; listin - list of entries to be searched. If not supplied, or
21 ; set to -1, then all entries are searched
27 ; or many times in the database. Use the function DBMATCH if a
28 ; one to one correspondence is desired between VALUES and LIST.
29 ; OPTIONAL INPUT KEYWORDS:
30 ; /SILENT - If this keyword is set, then DBGET will not display
31 ; the number of entries found
inmcreator.m (git://pkgs.fedoraproject.org/apbs) MATLAB · 670 lines
8 %
9 % INMCREATOR('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in INMCREATOR.M with the given input arguments.
11 %
12 % INMCREATOR('Property','Value',...) creates a new INMCREATOR or raises the
14 % applied to the GUI before inmcreator_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to inmcreator_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
650 end
651 if strcmp(handles.bc, 'focusname.inm')==1
652 warndlg('The inputfile.inm was generated. Please type now the corresponding values for the coarse grid calculation and then press Generate Input Files again','!! Warning, Focus Boundary Condition !!')
653 handles.filename='focusname.inm';
654 guidata(hObject, handles);
savesurfpoly.m (http://horwitzlab.googlecode.com/svn/) MATLAB · 228 lines
8 % date: 2007/11/21
9 %
10 % input:
11 % v: input, surface node list, dimension (nn,3)
12 % if v has 4 columns, the last column specifies mesh density near each node
13 % f: input, surface face element list, dimension (be,3)
14 % holelist: list of holes, each hole is represented by an internal point
15 % regionlist: list of regions, similar to holelist
circ_otest.m (http://sqwang-matlab.googlecode.com/svn/trunk/) MATLAB · 82 lines
LogInDetails.m (http://stock-shock-source.googlecode.com/svn/trunk/) MATLAB · 151 lines
8 %
9 % LOGINDETAILS('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in LOGINDETAILS.M with the given input arguments.
11 %
12 % LOGINDETAILS('Property','Value',...) creates a new LOGINDETAILS or raises the
14 % applied to the GUI before LogInDetails_OpeningFunction gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to LogInDetails_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
ft_datatype_mvar.m (http://brainstream.googlecode.com/svn/trunk/) MATLAB · 107 lines
gacreationuniform.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 53 lines
bwarea.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 58 lines
odeexamples.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 54 lines
cheb1ord.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 150 lines
random.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 172 lines
TimeCourse.m (http://horwitzlab.googlecode.com/svn/) MATLAB · 117 lines
ccdPowerInstruction.m (http://atf2flightsim.googlecode.com/svn/trunk/) MATLAB · 78 lines
8 %
9 % CCDPOWERINSTRUCTION('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in CCDPOWERINSTRUCTION.M with the given input arguments.
11 %
12 % CCDPOWERINSTRUCTION('Property','Value',...) creates a new CCDPOWERINSTRUCTION or raises the
14 % applied to the GUI before ccdPowerInstruction_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to ccdPowerInstruction_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
ft_datatype_source.m (http://open-realtime-fmri.googlecode.com/svn/trunk/) MATLAB · 170 lines
filter_remove_color.m (http://twenties-video-filter.googlecode.com/svn/trunk/) MATLAB · 88 lines
9 % VIDEO = FILTER_REMOVE_COLOR(VIDEO, MODE) returns the original video structure
10 % with the updated current video.frame(1).filtered. Each filter takes
11 % video.frame(1).filtered as input and writes the result back to this array.
12 %
13 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
StepDos.m (http://dccn-lab.googlecode.com/svn/trunk/) MATLAB · 169 lines
aubt_getRWaves.m (http://siento.googlecode.com/svn/trunk/) MATLAB · 32 lines
filter_highcontrast.m (http://twenties-video-filter.googlecode.com/svn/trunk/) MATLAB · 58 lines
sphfit.m (git://github.com/yuval-harpaz/ft_BIU.git) MATLAB · 116 lines
3 % usage: [center,radius]=sphfit(vc,Ni,stopth)
4 %
5 % input:
6 % vc nx3 matrix, where each row represents the location
7 % of one surface point. vc can have more than 3 columns
17 % written by Guido Nolte
18 % updated by Christophe Phillips, 2009/1/19
19 % - add the number of iterations as input, use 5 as default
20 % - add a stopping criteria based on the relative difference between 2
21 % successive estimates of the radius.
disperror.m (http://research-code-base-animesh.googlecode.com/svn/trunk/) MATLAB · 92 lines
history_subject1.m (git://github.com/yuval-harpaz/ft_BIU.git) MATLAB · 496 lines
Volume.m (http://freesteamplus.googlecode.com/svn/trunk/) MATLAB · 319 lines
149 error(nargchk(4, 7, nargin, 'struct'))
150 if ((nargin > 4) && (nargin < 7))
151 error('Therm:nargchk:improperNumberOfInputs','Improper number of input arguments.')
152 end
153 if strcmpi(prop1,'v')
173 error(nargchk(4, 7, nargin, 'struct'))
174 if ((nargin > 4) && (nargin < 7))
175 error('Therm:nargchk:improperNumberOfInputs','Improper number of input arguments.')
176 end
177 if strcmpi(prop1,'v')
197 error(nargchk(4, 7, nargin, 'struct'))
198 if ((nargin > 4) && (nargin < 7))
199 error('Therm:nargchk:improperNumberOfInputs','Improper number of input arguments.')
200 end
201 if strcmpi(prop1,'v')
mu2lin.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 85 lines
panel_sound_devices.xml (https://bitbucket.org/lindenlab/viewer-beta/) XML · 26 lines
adjacency.m (http://uppsala-university.googlecode.com/svn/trunk/) MATLAB · 36 lines
quickT4_fit.m (http://dotsx.googlecode.com/svn/trunk/) MATLAB · 1 lines
1 function [fits_,sems_,stats_,preds_,resids_] = quickT4_fit(data,guess,lapse) % function [fits_,sems_,stats_,preds_,resids_] = quickT4_fit(data,guess,lapse) % % QUICKT4_FIT fits a weibull function to psychometric data using % maximum likelihood maximization. It uses quickT4_err for % error calculation. % % Input values are: % data, in 4 columns... % data(1) = coh (0 .. 99.9%) % data(2) = time (seconds) % data(3) = dot dir: left (-1) / right (1) % data(4) = correct (1) / error (0) % % Return values are: % fits_ ... see quickT3_val for details % fits_(1) ... A (coh scale) % fits_(2) ... n (coh exponent) % fits_(3) ... B (time scale) % fits_(4) ... m (time exponent) % fits_(5) ... guess (guess bias) % fits_(6) ... lapse ("lapse") % sems_ ... Standard errors of the fits. Approximated using the % numerical HESSIAN returned by fmincon (default) % stats_ ... [fitLLR Deviance p] % fitLLR is the log likelihood of obtaining the % data given the fit (returned by quick_err) % Deviance is 2(dataLLR - fitLLR) % p is probability from chi^2 pdf with df = #blocks-3 % preds_ ... A vector of the probability of making a correct choice given % the fit % resids_ ... col 1: log diff between model and actual outcomes % col 2: log diff between model and actual choices (see below) % Created by jig 9/14/05 if nargin < 1 || isempty(data) return end global Data Data = data; if nargin < 2 guess = []; end if nargin < 3 lapse = []; end %% do the fit if isempty(guess) && isempty(lapse) % fit both guess and lapse [fits_,f,e,o,l,g,H] = fmincon('quickT4_err', ... [ 0.05 0.5 2 0.1 0.0 0.0 ]', [], [], [], [], ... [ 0.001 0 0.01 0 -0.4 0.0 ]', ... [ 5 3 5 3 0.4 0.5 ]', [], ... optimset('LargeScale', 'off', 'Display', 'off', 'Diagnostics', 'off')); elseif isempty(guess) % fit both guess and lapse [fits,f,e,o,l,g,H] = fmincon('quickT4_err', ... [ 0.05 0.5 2 0.1 0.0 ]', [], [], [], [], ... [ 0.001 0 0.01 0 -0.45 ]', ... [ 5 3 5 3 0.45 ]', [], ... optimset('LargeScale', 'off', 'Display', 'off', 'Diagnostics', 'off'), ... [], lapse); fits_ = [fits; lapse]; elseif isempty(lapse) % fit both guess and lapse [fits,f,e,o,l,g,H] = fmincon('quickT4_err', ... [ 0.05 0.5 2 0.1 0.0 ]', [], [], [], [], ... [ 0.001 0 0.01 0 0.0 ]', ... [ 5 3 5 3 0.5 ]', [], ... optimset('LargeScale', 'off', 'Display', 'off', 'Diagnostics', 'off'), ... guess, []); fits_ = [fits(1:4); guess; fits(5)]; else % fit both guess and lapse [fits,f,e,o,l,g,H] = fmincon('quickT4_err', ... [ 0.05 0.5 2 0.1 ]', [], [], [], [], ... [ 0.001 0 0.01 0 ]', ... [ 5 3 5 3 ]', [], ... optimset('LargeScale', 'off', 'Display', 'off', 'Diagnostics', 'off'), ... guess, lapse); fits_ = [fits; guess; lapse]; end % Standard errors % The covariance matrix is the negative of the inverse of the % hessian of the natural logarithm of the probability of observing % the data set given the optimal parameters. % For now, use the numerically-estimated HESSIAN returned by fmincon % (which remember is computed from -log likelihood) if nargout > 1 % -H because we used -logL in quick_err sems_ = sqrt(diag(-((-H)^(-1)))); end % return stats if nargout > 2 % log likelihood of the fits ("M1" in Watson) % is just the negative of the error function M1 = -quickT4_err(fits_); % deviance is 2(M0 - M1), where % M0 is the log likelihood of the data ("saturated model") -- % which in this case is, of course, ZERO dev = -2*M1; % probability is from cdf if isempty(guess) && isempty(lapse) p = 1 - chi2cdf(dev, size(data, 1) - 6); elseif isempty(guess) || isempty(lapse) p = 1 - chi2cdf(dev, size(data, 1) - 5); else p = 1 - chi2cdf(dev, size(data, 1) - 4); end stats_ = [M1 dev p]; end % return the predicted probability (of a correct response) for each observation if nargout > 3 preds_ = quickT4_val(Data(:,1:end-1), fits_); end % return the deviance residuals ... these are the square roots % of each deviance computed individually, signed according to % the direction of the arithmatic residual y_i - p_i. % See Wichmann & Hill, 2001, "The psychometric function: I. Fitting, % sampling, and goodness of fit if nargout > 4 % resids on correct/error cepreds = preds_; cepreds(data(:, 4) == 0) = 1 - cepreds(data(:, 4) == 0); % choice resids are a little trickier - we have to % make predictions based on choice lrpreds = preds_; lrpreds(data(:, 3) == -1) = 1 - lrpreds(data(:, 3) == -1); choices = data(:, 3); choices(data(:, 4) == 0) = -choices(data(:, 4) == 0); % first column is c/e resids % second column is l/r resids resids_ = [ ... (data(:, 4).*2-1) .* sqrt(-2.*log(cepreds)), ... choices .* sqrt(-2.*log(lrpreds))]; end
bpsk.m (http://spreadspectrum.googlecode.com/svn/trunk/) MATLAB · 23 lines
knn.m (http://princeton-mvpa-toolbox.googlecode.com/svn/trunk/) MATLAB · 36 lines
4 % Description
5 % NET = KNN(NIN, NOUT, K, TR_IN, TR_TARGETS) creates a KNN model NET
6 % with input dimension NIN, output dimension NOUT and K neighbours.
7 % The training data is also stored in the data structure and the
8 % targets are assumed to be using a 1-of-N coding.
10 % The fields in NET are
11 % type = 'knn'
12 % nin = number of inputs
13 % nout = number of outputs
14 % tr_in = training input data
rotateGUI.m (http://matlab-image-customizer.googlecode.com/svn/trunk/) MATLAB · 123 lines
8 %
9 % ROTATEGUI('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in ROTATEGUI.M with the given input arguments.
11 %
12 % ROTATEGUI('Property','Value',...) creates a new ROTATEGUI or raises the
14 % applied to the GUI before rotateGUI_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to rotateGUI_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
som_eucdist2.m (http://research-code-base-animesh.googlecode.com/svn/trunk/) MATLAB · 95 lines
10 % d=som_eucdist(datamatrix1, datamatrix2);
11 %
12 % Input and output arguments ([]'s are optional):
13 % D (matrix) size Nxd
14 % (struct) map or data struct
70 end
72 % Check that inputs are matrices
73 if ~vis_valuetype(proto,{'nxm'}) | ~vis_valuetype(data,{'nxm'}),
74 error('Prototype or data input not valid.')
set_option.m (http://lamp-solar.googlecode.com/svn/trunk/) MATLAB · 34 lines
aubt_getSpecRange.m (http://siento.googlecode.com/svn/trunk/) MATLAB · 29 lines
aubt_detecPQST.m (http://siento.googlecode.com/svn/trunk/) MATLAB · 83 lines
1 function [pind, qind, sind, tind] = aubt_detecPQST (signal, hz, rind)
2 % Expects an ECG signal and a corresponding vector with the fiducial
3 % locations of the r-waves as input and tries to detected the position of the
4 % P and T waves and the Q and S peak. Therefore positive and negative peaks
5 % on both sides of each r location are seeked. To achieve better results
15 % [pind, qind, sind, tind] = aubt_detecPQST (signal, hz, rind)
16 %
17 % input:
18 % signal the ECG signal
19 % hz sample rate of the signal
dbwrt.pro
(git://github.com/charleshull6/c_soft.git)
IDL · 207 lines
✨ Summary
This IDL code is a function that updates an index database by inserting, updating, and sorting values based on user-provided data. It takes in various parameters such as the index type, data values, and byte sizes to determine how to update the index records. The function returns after completing the necessary operations.
This IDL code is a function that updates an index database by inserting, updating, and sorting values based on user-provided data. It takes in various parameters such as the index type, data values, and byte sizes to determine how to update the index records. The function returns after completing the necessary operations.
This IDL code is a function that updates an index database by inserting, updating, and sorting values based on user-provided data. It takes in various parameters such as the index type, data values, and byte sizes to determine how to update the index records. The function returns after completing the necessary operations.
This IDL code is a function that updates an index database by inserting, updating, and sorting values based on user-provided data. It takes in various parameters such as the index type, data values, and byte sizes to determine how to update the index records. The function returns after completing the necessary operations.
9 ; dbwrt, entry, [ index, append, /NoConvert ]
10 ;
11 ; INPUTS:
12 ; entry - entry record to be updated or added if first
13 ; item (entry number=0)
14 ;
15 ; OPTIONAL INPUTS:
16 ; index - optional integer flag, if set to non zero then index
17 ; file is updated. (default=0, do not update index file)
25 ; data base file is updated.
26 ; If index is non-zero then the index file is updated.
27 ; OPTIONAL INPUT KEYWORD:
28 ; NoConvert - If set then don't convert to host format with an external
29 ; database. Useful when the calling program decides that
outputfileFF.m (http://atf2flightsim.googlecode.com/svn/trunk/) MATLAB · 122 lines
8 %
9 % OUTPUTFILEFF('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in OUTPUTFILEFF.M with the given input arguments.
11 %
12 % OUTPUTFILEFF('Property','Value',...) creates a new OUTPUTFILEFF or raises the
14 % applied to the GUI before outputfileFF_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to outputfileFF_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
subplot.m (https://plplot.svn.sourceforge.net/svnroot/plplot) MATLAB · 118 lines
base64encode.m (http://psychtoolbox-3.googlecode.com/svn/beta/Psychtoolbox/) MATLAB · 1 lines
1 function y = base64encode(x, eol) %BASE64ENCODE Perform base64 encoding on a string. % % BASE64ENCODE(STR, EOL) encode the given string STR. EOL is the line ending % sequence to use; it is optional and defaults to '\n' (ASCII decimal 10). % The returned encoded string is broken into lines of no more than 76 % characters each, and each line will end with EOL unless it is empty. Let % EOL be empty if you do not want the encoded string broken into lines. % % STR and EOL don't have to be strings (i.e., char arrays). The only % requirement is that they are vectors containing values in the range 0-255. % % This function may be used to encode strings into the Base64 encoding % specified in RFC 2045 - MIME (Multipurpose Internet Mail Extensions). The % Base64 encoding is designed to represent arbitrary sequences of octets in a % form that need not be humanly readable. A 65-character subset % ([A-Za-z0-9+/=]) of US-ASCII is used, enabling 6 bits to be represented per % printable character. % % Examples % -------- % % If you want to encode a large file, you should encode it in chunks that are % a multiple of 57 bytes. This ensures that the base64 lines line up and % that you do not end up with padding in the middle. 57 bytes of data fills % one complete base64 line (76 == 57*4/3): % % If ifid and ofid are two file identifiers opened for reading and writing, % respectively, then you can base64 encode the data with % % while ~feof(ifid) % fwrite(ofid, base64encode(fread(ifid, 60*57))); % end % % or, if you have enough memory, % % fwrite(ofid, base64encode(fread(ifid))); % % See also BASE64DECODE. % Author: Peter J. Acklam % Time-stamp: 2004-02-03 21:36:56 +0100 % E-mail: pjacklam@online.no % URL: http://home.online.no/~pjacklam % check number of input arguments error(nargchk(1, 2, nargin)); % make sure we have the EOL value if nargin < 2 eol = sprintf('\n'); else if sum(size(eol) > 1) > 1 error('EOL must be a vector.'); end if any(eol(:) > 255) error('EOL can not contain values larger than 255.'); end end if sum(size(x) > 1) > 1 error('STR must be a vector.'); end x = uint8(x); eol = uint8(eol); ndbytes = length(x); % number of decoded bytes nchunks = ceil(ndbytes / 3); % number of chunks/groups nebytes = 4 * nchunks; % number of encoded bytes % add padding if necessary, to make the length of x a multiple of 3 if rem(ndbytes, 3) x(end+1 : 3*nchunks) = 0; end x = reshape(x, [3, nchunks]); % reshape the data y = repmat(uint8(0), 4, nchunks); % for the encoded data %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Split up every 3 bytes into 4 pieces % % aaaaaabb bbbbcccc ccdddddd % % to form % % 00aaaaaa 00bbbbbb 00cccccc 00dddddd % y(1,:) = bitshift(x(1,:), -2); % 6 highest bits of x(1,:) y(2,:) = bitshift(bitand(x(1,:), 3), 4); % 2 lowest bits of x(1,:) y(2,:) = bitor(y(2,:), bitshift(x(2,:), -4)); % 4 highest bits of x(2,:) y(3,:) = bitshift(bitand(x(2,:), 15), 2); % 4 lowest bits of x(2,:) y(3,:) = bitor(y(3,:), bitshift(x(3,:), -6)); % 2 highest bits of x(3,:) y(4,:) = bitand(x(3,:), 63); % 6 lowest bits of x(3,:) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Now perform the following mapping % % 0 - 25 -> A-Z % 26 - 51 -> a-z % 52 - 61 -> 0-9 % 62 -> + % 63 -> / % % We could use a mapping vector like % % ['A':'Z', 'a':'z', '0':'9', '+/'] % % but that would require an index vector of class double. % z = repmat(uint8(0), size(y)); i = y <= 25; z(i) = 'A' + double(y(i)); i = 26 <= y & y <= 51; z(i) = 'a' - 26 + double(y(i)); i = 52 <= y & y <= 61; z(i) = '0' - 52 + double(y(i)); i = y == 62; z(i) = '+'; i = y == 63; z(i) = '/'; y = z; %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % Add padding if necessary. % npbytes = 3 * nchunks - ndbytes; % number of padding bytes if npbytes y(end-npbytes+1 : end) = '='; % '=' is used for padding end if isempty(eol) % reshape to a row vector y = reshape(y, [1, nebytes]); else nlines = ceil(nebytes / 76); % number of lines neolbytes = length(eol); % number of bytes in eol string % pad data so it becomes a multiple of 76 elements y(nebytes + 1 : 76 * nlines) = 0; y = reshape(y, 76, nlines); % insert eol strings eol = eol(:); y(end + 1 : end + neolbytes, :) = eol(:, ones(1, nlines)); % remove padding, but keep the last eol string m = nebytes + neolbytes * (nlines - 1); n = (76+neolbytes)*nlines - neolbytes; y(m+1 : n) = ''; % extract and reshape to row vector y = reshape(y, 1, m+neolbytes); end % output is a character array y = char(y);
guineapig.m (http://slac-lucretia.googlecode.com/svn/trunk/) MATLAB · 142 lines
7 % charge information) and a GuineaPig "acc.dat" template file.
8 %
9 % INPUTs
10 %
11 % erfile = matLIAR (DIMAD) "electron" output rays file name
28 wdir='D:\guineapig\work'; % working directory
30 % make input filespecs DOS compatible
32 erfiled=strrep(erfile,'/','\'); % DOS format
65 % run Andrei's GuineaPig prep program
67 disp(' preparing GuineaPig input files ...')
69 cmd=[gdir,'\prepare_gp'];
ft_filter_event.m (git://github.com/yuval-harpaz/ft_BIU.git) MATLAB · 120 lines
colifilt.m (http://sparse-mri-reconstruction.googlecode.com/svn/trunk/) MATLAB · 98 lines
detrend.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 158 lines
quaternion.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 115 lines
arfit2.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 100 lines
odeprint.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 68 lines
18 %# -*- texinfo -*-
19 %# @deftypefn {Function} {@var{[ret]} =} odeprint (@var{t, y, flag})
20 %# Displays the results of the differential equations in the octave window while solving. The first column shows the actual time stamp, the following columns show the values of the solvers for each time stamp. The return value @var{ret} depends on the input value @var{flag}. If @var{flag} is the string "init" then nothing is returned, else if @var{flag} is empty then true (resp. value 1) is returned to tell the calling solver function to continue, else if @var{flag} is the string "done" then again nothing will be returned. The input arguments @var{t} and @var{y} are the actual time stamp and the solver output. This function is an odepkg plotter function that can be set with @command{odeset}, therefore this function should never be directly called by the user. No error handling has been implemented in this function to achieve the highest processing speed.
21 %#
22 %# Run
31 %# As in the definitions of initial value problems as functions and if
32 %# somebody uses event functions all input and output vectors must be
33 %# column vectors by now.
34 function [varargout] = odeprint (vt, vy, vflag, varargin)
36 %# No input argument check is done for a higher processing speed
37 %# vt and vy are always column vectors, see also function odeplot,
38 %# odephas2 and odephas3 for another implementation. vflag either
test_put_get_att.m (http://m--pack.googlecode.com/svn/trunk/) MATLAB · 395 lines
49 input_data = 3.14159;
50 status = mexnc ( 'put_att_double', ncid, varid, 'test_double', nc_double, 1, input_data );
51 if ( status < 0 )
52 ncerr = mexnc ( 'strerror', status );
74 if ( return_value ~= input_data )
75 err_msg = sprintf ( '%s: return value did not match input for [PUT,GET]_ATT_DOUBLE\n', mfilename );
76 error ( err_msg );
77 end
214 error ( err_msg );
215 end
216 if ( double(return_value) ~= double(input_data) )
217 err_msg = sprintf ( '%s: return value did not match input for [PUT,GET]_ATT_SHORT\n', mfilename );
331 input_data = 'It was a dark and stormy night. Suddenly a shot rang out.';
332 status = mexnc ( 'put_att_text', ncid, varid, 'test_char', nc_char, length(input_data), input_data );
333 if ( status < 0 )
334 ncerr = mexnc ( 'strerror', status );
psycho.m (http://aac-codec-matlab.googlecode.com/svn/) MATLAB · 151 lines
istype.m (http://acq3.googlecode.com/svn/trunk/) MATLAB · 32 lines
circ_plot.m (http://sqwang-matlab.googlecode.com/svn/trunk/) MATLAB · 144 lines
CreateField.m (http://thesisyossim.googlecode.com/svn/) MATLAB · 101 lines
20 Grid.Length = 0.30;
22 % Parameters of the input laser beam
23 Laser.lambda = 1064e-9;
24 Laser.beam_radius = 0.0200;
27 Laser.power = 1;
29 Laser.amplitude = sqrt(Laser.power*2/(pi*Laser.beam_radius^2)); % Amplitude for TEM00 input beam
30 %--------------------- Cavity parameters ---------------------------
89 CreateMirror;
91 %------------------- Create input EM field ----------------------
93 Field.Start = complex(zeros(Grid.Num_point,Grid.Num_point,'double'));
__calcperf.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 111 lines
29 ## comment:
30 ## perf, net performance.. from input to output through the hidden layers
31 ## Aa, output values of the hidden and last layer (output layer)
32 ## is used for NEWFF network types
43 ## shortcuts
44 IWtemp = cell(net.numLayers,net.numInputs,1);# IW: input weights ...
45 LWtemp = cell(net.numLayers,net.numLayers,1);# LW: layer weights ...
46 Aa = cell(net.numLayers,1);# Outputs hidden and output layer
52 for iLayers = 1:net.numLayers
54 ## calculate first input weights to weighted inputs..
55 ## this can be done with matrix calculation...
56 ## called "dotprod"
tunstallcode.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 93 lines
odepkg_equations_vanderpol.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 112 lines
21 %#
22 %# @deftypefnx {Function} {@var{ydot} =} odepkg_equations_vanderpol (@var{t, y})
23 %# Returns two derivatives of the ordinary differential equations (ODEs) from the "Van der Pol" implementation, cf. @url{http://en.wikipedia.org/wiki/Van_der_Pol_oscillator} for further details. The output argument @var{ydot} is a column vector and contains the derivatives, @var{y} also is a column vector that contains the integration results from the previous integration step and @var{t} is a scalar value with actual time stamp. There is a error handling implemented in this function, ie. if an unvalid input argument is found then this function terminates with an error.
24 %#
25 %# Run
44 if (nargin == 0)
45 help ('odepkg_equations_vanderpol');
46 vmsg = sprintf ('Number of input arguments must be greater than zero');
47 error (vmsg);
49 elseif (nargin < 2 || nargin > 3)
50 vmsg = sprintf ('Number of input arguments must be greater 1 and lower 4');
51 error (vmsg);
get_ATF2_sexts_I.m (http://atf2flightsim.googlecode.com/svn/trunk/) MATLAB · 144 lines
test_nc_datatype_string.m (http://m--pack.googlecode.com/svn/trunk/) MATLAB · 229 lines
binsurface.m (http://brainstream.googlecode.com/svn/trunk/) MATLAB · 92 lines
gamutCheck.m (http://horwitzlab.googlecode.com/svn/) MATLAB · 91 lines
twiss_analysis_sha.m (http://atf2flightsim.googlecode.com/svn/trunk/) MATLAB · 75 lines
mkbasis.m (http://horwitzlab.googlecode.com/svn/) MATLAB · 55 lines
6 % onto 2-D linear subspaces.
7 %
8 % INPUT
9 % in: A column matrix of vectors that span the subspace
10 % of interest.
11 % opt: Option flag that specifies operations to be
12 % performed on the input vectors
13 % 'RotOrtho': Rotate columns [2:end] so that
14 % they are orthogonal to column 1
15 % 'ProjOrtho': If called with a three column
16 % input matrix - returns the linear combination
17 % of the 2nd and 3rd input columns that is orthogonal
18 % to the first input column.
19 %
20 % If the 'opt' field is left blank, we just scale
prodc.m (http://research-code-base-animesh.googlecode.com/svn/trunk/) MATLAB · 59 lines
subplot.m (https://plplot.svn.sourceforge.net/svnroot/plplot) MATLAB · 128 lines
tokenize.m (git://github.com/yuval-harpaz/ft_BIU.git) MATLAB · 77 lines
39 % $Id: tokenize.m 1388 2010-07-10 09:12:47Z roboos $
41 % these are for remembering the type on subsequent calls with the same input arguments
42 persistent previous_argin previous_argout
69 end
71 % remember the current input and output arguments, so that they can be
72 % reused on a subsequent call in case the same input argument is given
timeZoneGui.m (http://atf2flightsim.googlecode.com/svn/trunk/) MATLAB · 141 lines
8 %
9 % TIMEZONEGUI('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in TIMEZONEGUI.M with the given input arguments.
11 %
12 % TIMEZONEGUI('Property','Value',...) creates a new TIMEZONEGUI or raises the
14 % applied to the GUI before timeZoneGui_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to timeZoneGui_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
olgd.m (http://pmtksupport.googlecode.com/svn/trunk/) MATLAB · 183 lines
5 % [NET, OPTIONS, ERRLOG, POINTLOG] = OLGD(NET, OPTIONS, X, T) uses on-
6 % line gradient descent to find a local minimum of the error function
7 % for the network NET computed on the input data X and target values T.
8 % A log of the error values after each cycle is (optionally) returned
9 % in ERRLOG, and a log of the points visited is (optionally) returned
meandev.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 81 lines
delete_sst.m (http://seismic-event-matlab-suite.googlecode.com/svn/trunk/) MATLAB · 56 lines
nethess.m (http://pmtksupport.googlecode.com/svn/trunk/) MATLAB · 31 lines
rbfjacob.m (http://pmtksupport.googlecode.com/svn/trunk/) MATLAB · 51 lines
1 function jac = rbfjacob(net, x)
2 %RBFJACOB Evaluate derivatives of RBF network outputs with respect to inputs.
3 %
4 % Description
6 % of input vectors X and returns a three-index matrix G whose I, J, K
7 % element contains the derivative of network output K with respect to
8 % input parameter J for input pattern I.
9 %
10 % See also
calib_find.m (http://atf2flightsim.googlecode.com/svn/trunk/) MATLAB · 115 lines
8 %
9 % CALIB_FIND('CALLBACK',hObject,eventData,handles,...) calls the local
10 % function named CALLBACK in CALIB_FIND.M with the given input arguments.
11 %
12 % CALIB_FIND('Property','Value',...) creates a new CALIB_FIND or raises the
14 % applied to the GUI before calib_find_OpeningFcn gets called. An
15 % unrecognized property name or invalid value makes property application
16 % stop. All inputs are passed to calib_find_OpeningFcn via varargin.
17 %
18 % *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
ft_datatype_spike.m (http://open-realtime-fmri.googlecode.com/svn/trunk/) MATLAB · 105 lines
AddField.m (http://stock-shock-source.googlecode.com/svn/trunk/) MATLAB · 36 lines
boot2ci.m (http://horwitzlab.googlecode.com/svn/) MATLAB · 61 lines
subdir.m (http://horwitzlab.googlecode.com/svn/) MATLAB · 111 lines
gpfwd.m (http://pmtksupport.googlecode.com/svn/trunk/) MATLAB · 53 lines
4 % Description
5 % Y = GPFWD(NET, X) takes a Gaussian Process data structure NET
6 % together with a matrix X of input vectors, and forward propagates
7 % the inputs through the model to generate a matrix Y of output
8 % vectors. Each row of X corresponds to one input vector and each row
9 % of Y corresponds to one output vector. This assumes that the
10 % training data (both inputs and targets) has been stored in NET by a
33 if ~(isfield(net, 'tr_in') & isfield(net, 'tr_targets'))
34 error('Require training inputs and targets');
35 end
ft_volumereslice.m (http://brainstream.googlecode.com/svn/trunk/) MATLAB · 113 lines
16 %
17 % Undocumented local options:
18 % cfg.inputfile = one can specifiy preanalysed saved data as input
19 % cfg.outputfile = one can specify output as file to save to disk
45 if ~isfield(cfg, 'resolution'); cfg.resolution = 1; end % in physical units
46 if ~isfield(cfg, 'downsample'); cfg.downsample = 1; end
47 if ~isfield(cfg, 'inputfile'), cfg.inputfile = []; end
48 if ~isfield(cfg, 'outputfile'), cfg.outputfile = []; end
53 % the input data should be read from file
54 if hasdata
55 error('cfg.inputfile should not be used in conjunction with giving input data to this function');
56 else
57 mri = loadvar(cfg.inputfile, 'data');
dXdots.m (http://dotsx.googlecode.com/svn/trunk/) MATLAB · 1 lines
1 function [ds_, attributes_, batchMethods_] = dXdots(num_objects) % function [ds_, attributes_, batchMethods_] = dXdots(num_objects) % % Constructor method for class dots % Input: % num_objects ... number of objects to create % % Output: % ds_ ... array of created dots % attributes_ ... default object attributes % batchMethods_ ... methods that can be run in a batch (e.g., draw) % Copyright 2004 by Joshua I. Gold % University of Pennsylvania % get screen values [wn, sr, ppd, fr] = rGraphicsGetScreenAttributes; % default object attributes attributes = { ... % name type values default 'coherence', 'scalar', [], 51.2; ... % pct 'direction', 'scalar', [], 0; ... % deg 'speed', 'scalar', [], 8.0; ... % deg/sec 'seed', 'array', [], []; ... % [base coh*dir] 'size', 'scalar', [], 3; ... % pixels 'color', 'array', [], [1 1 1]*255;... % [r,g,b] 'bgColor', 'array', [], [0 0 0];... % [r,g,b] for aperture 'maxPerFrame', 'scalar', [], 9999; ... % number of dots 'loops', 'scalar', [], 3; ... % interleaved dots 'duration', 'scalar', [], 0; ... % ms (used if preCompute) 'density', 'scalar', [], 16.7; ... % 16.7 dots per sq.deg/sec 'x', 'scalar', [], 0; ... % deg visual angle 'y', 'scalar', [], 0; ... % deg visual angle 'diameter', 'scalar', [], 10.0; ... % deg visual angle 'apScale', 'scalar', [], 1.1; ... % >1 for bdotsigger field than aperture 'userData', 'array', [], []; ... % 'smooth', 'scalar', [], 0.0; ... % if set = 1, be sure to set dXscreen "blending" to true 'preCompute', 'scalar', [], 0; ... % -1='auto'; 0=no; 1+=#trials 'groupMotion', 'boolean', [], false; ... % move all dots together, or individually? 'deltaDir', 'scalar', [], 0; ... 'dirDomain', 'array', [], []; ... % arbitrary directions 'dirCDF', 'array', [], []; ... % arbitrary directions distribution 'flickerMode', 'string', {'random', 'move'}, 'random'; ... % displacement of non-coh dots 'wrapMode', 'string', {'random', 'wrap'}, 'wrap'; ... % dots behavior at edge of aperture 'lifetimeMode', 'string', {'random', 'limit'}, 'limit'; ... % force limited lifetime of dots 'visible', 'boolean', [], 0; ... 'tag', 'scalar', [], 0; ... % ignored for now 'debugSavePts', 'boolean', [], 0; ... % save all points data for debugging (SLOW!!!!) 'windowNumber', 'auto', [], wn; ... 'screenRect', 'auto', [], sr; ... 'pixelsPerDegree', 'auto', [], ppd; ... 'frameRate', 'auto', [], fr; ... 'drawRect', 'auto', [], []; ... % where dots are drawn 'drawSize', 'auto', [], []; ... % draw rect width (deg) 'drawSizePix', 'auto', [], []; ... % draw rect width (pix) 'dirCDFInv', 'auto', [], []; ... % arbitrary directions distribution 'nP', 'auto', [], 1e2; ... % size of CDFInv domain 'dxdyDomain', 'auto', [], []; ... % components of direction distribution 'maskColor', 'auto', [], [0 0 0]; ... % background color 'maskRect', 'auto', [], []; ... % mask screen location 'maskSource', 'auto', [], []; ... % mask extent in pix 'maskImage', 'auto', [], []; ... % mask RGBA image 'maskTexindex', 'auto', [], []; ... % pointer to GL texture 'apRect', 'auto', [], []; ... % viewable extent in mask 'dotCoh', 'auto', [], []; ... 'nDots', 'auto', [], []; ... 'jumpSize', 'auto', [], []; ... 'dxdy', 'auto', [], []; ... 'loopIndex', 'auto', [], []; ... 'pts', 'auto', [], []; ... 'Lpts', 'auto', [], []; ... 'ptsHistory', 'auto', [], []; ... % ugly, growing log of xy data for debugging 'sourceRect', 'auto', [], []; ... % unimplemented 'textures', 'auto', [], []; ... 'textureIndex', 'auto', [], 1}; % see set & recur % make an array of objects from structs made from the attributes d = cell2struct(attributes(:,4), attributes(:,1), 1); for i = 1:num_objects ds_(i) = class(d, 'dXdots'); end % return the attributes, if necessary if nargout > 1 attributes_ = attributes; end % return list of batch methods if nargout > 2 batchMethods_ = {'draw', 'blank'}; end
odepkg_structure_check.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 365 lines
forward.m (git://github.com/karaaie/VoiceRecognitionMatlab.git) MATLAB · 1 lines
1 function [alfaHat, c]=forward(mc,pX) %[alfaHat, c]=forward(mc,pX) %calculates state and observation probabilities for one single data sequence, %using the forward algorithm, for a given single MarkovChain object, %to be used when the MarkovChain is included in a HMM object. % %Input: %mc= single MarkovChain object %pX= matrix with state-conditional likelihood values, % without considering the Markov depencence between sequence samples. % pX(j,t)= myScale(t)* P( X(t)= observed x(t) | S(t)= j ); j=1..N; t=1..T % (must be pre-calculated externally) %NOTE: pX may be arbitrarily scaled, as defined externally, % i.e., pX may not be a properly normalized probability density or mass. % %NOTE: If the HMM has Finite Duration, it is assumed to have reached the end %after the last data element in the given sequence, i.e. S(T+1)=END=N+1. % %Result: %alfaHat=matrix with normalized state probabilities, given the observations: % alfaHat(j,t)=P[S(t)=j|x(1)...x(t), HMM]; t=1..T %c=row vector with observation probabilities, given the HMM: % c(t)=P[x(t) | x(1)...x(t-1),HMM]; t=1..T % c(1)*c(2)*..c(t)=P[x(1)..x(t)| HMM] % If the HMM has Finite Duration, the last element includes % the probability that the HMM ended at exactly the given sequence length, i.e. % c(T+1)= P( S(T+1)=N+1| x(1)...x(T-1), x(T) ) %Thus, for an infinite-duration HMM: % length(c)=T % prod(c)=P( x(1)..x(T) ) %and, for a finite-duration HMM: % length(c)=T+1 % prod(c)= P( x(1)..x(T), S(T+1)=END ) % %NOTE: IF pX was scaled externally, the values in c are % correspondingly scaled versions of the true probabilities. % %-------------------------------------------------------- %Code Authors: %-------------------------------------------------------- T=size(pX,2);%Number of observations numberOfStates = length(mc.InitialProb) q = mc.InitialProb; A = mc.TransitionProb; B = pX; c = []; alfaHat = []; %initialization initAlfaTemp = []; for j=1:numberOfStates initAlfaTemp(j) = q(j)*B(j,1); end %sum AlfaTemps c =[c sum(initAlfaTemp)]; %calculate alfa hat for j=1:numberOfStates alfaHat = [alfaHat; initAlfaTemp(j)/c(1)]; end %forward step for t=2:T alfaTemp = []; for j=1:numberOfStates alfaTemp(j) = B(j,t)*(sum(alfaHat(:,t-1)'*A(:,j))); end c = [c sum(alfaTemp)]; for j=1:numberOfStates alfaTemp(j) = alfaTemp(j)/c(t); end alfaHat = [alfaHat alfaTemp']; end [rows columns] = size(A); if(rows ~= columns) c = [c sum(alfaHat(:,T)'*A(:,numberOfStates+1))]; end %termination end
plottetra.m (http://horwitzlab.googlecode.com/svn/) MATLAB · 67 lines
sshift2d.pro
(git://github.com/charleshull6/c_soft.git)
IDL · 137 lines
✨ Summary
The Code’s Purpose
The provided IDL code implements a function sshift2d
that shifts a 2D array by a specified amount along both x and y axes, replicating the margins to prevent wrapping around. It uses a damped sinc function for fractional part shifting, effectively creating an interpolation effect between integer shifts. The result is a shifted array with replicated borders, suitable for applications requiring precise control over image or data alignment.
The Code’s Purpose
The provided IDL code implements a function sshift2d
that shifts a 2D array by a specified amount along both x and y axes, replicating the margins to prevent wrapping around. It uses a damped sinc function for fractional part shifting, effectively creating an interpolation effect between integer shifts. The result is a shifted array with replicated borders, suitable for applications requiring precise control over image or data alignment.
The Code’s Purpose
The provided IDL code implements a function sshift2d
that shifts a 2D array by a specified amount along both x and y axes, replicating the margins to prevent wrapping around. It uses a damped sinc function for fractional part shifting, effectively creating an interpolation effect between integer shifts. The result is a shifted array with replicated borders, suitable for applications requiring precise control over image or data alignment.
The Code’s Purpose
The provided IDL code implements a function sshift2d
that shifts a 2D array by a specified amount along both x and y axes, replicating the margins to prevent wrapping around. It uses a damped sinc function for fractional part shifting, effectively creating an interpolation effect between integer shifts. The result is a shifted array with replicated borders, suitable for applications requiring precise control over image or data alignment.
cplxreal.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 74 lines
fminbnd.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 71 lines
im2bw.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 73 lines
33 img = rgb2gray(img);
34 if (nargin != 2)
35 error("im2bw: two input arguments must be given when the image is a color image");
36 endif
37 t = a;
39 img = ind2gray (img, a);
40 if (nargin != 3)
41 error("im2bw: three input arguments must be given when the image is indexed");
42 endif
43 t = b;
44 elseif (isgray(img))
45 if (nargin != 2)
46 error("im2bw: two input arguments must be given when the image is gray scale");
47 endif
48 t = a;
poly2th.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 71 lines
17 ## @deftypefn {Function File} {} {poly2th (@var{a}, @var{b}, @var{c}, @var{d}, @var{f}, @var{v}, @var{T})}
18 ##
19 ## Represent the generalized Multi-Input, Single-Output (MISO) system
20 ## defined as follows:
21 ##
24 ## where
25 ## e is white noise
26 ## u is the input signal
27 ## y is the output signal
28 ##
35 ## TODO: incorporate delays: if system is discrete (T>0), then delay for
36 ## TODO: input i is the number of leading zeros in b(:,i)
37 function th = poly2th(a,b,c,d,f,v,T)
38 if nargin<1 || nargin>7,
boundaryPR.m (http://phd-workspace.googlecode.com/svn/trunk/) MATLAB · 73 lines
plotting_S11.m (http://ua-fwlis.googlecode.com/svn/trunk/) MATLAB · 82 lines
temporal_sens_params.m (https://github.com/bnaecker/temporal-sens.git) MATLAB · 152 lines
dXgameHID.m (http://dotsx.googlecode.com/svn/trunk/) MATLAB · 1 lines
1 function [g_, attributes_, batchMethods_] = dXgameHID(num_objects) % function [g_, attributes_, batchMethods_] = dXgameHID(num_objects) % % Constructor method for class dXgameHID % DotsX interface to USB HID gamepads % % Input: % num_objects ... ignored -- always creates just one % % Output: % g_ ... created object % attributes_ ... default object attributes % batchMethods_ ... methods that can be run in a batch (e.g., draw) % Copyright 2007 Benjamin Heasly % University of Pennsylvania global ROOT_STRUCT % look for mex function available = exist('HIDx') == 3; % return empty matrix if not available, which % will automatically remove gameHID devices from the ui queue % if called from rInit if isfield(ROOT_STRUCT, 'dXgameHID') || ~available g_ = []; attributes_ = []; batchMethods_ = []; return end % how to find compatible device HIDCriteria.usageName = 'GamePad'; % default channelizer. % use raw values from each element % feebly guess at the number of elements: 8 n = 8; [HIDChannelizer(1:n).gain] = deal(1); [HIDChannelizer(1:n).offset] = deal(0); [HIDChannelizer(1:n).high] = deal(nan); [HIDChannelizer(1:n).low] = deal(nan); [HIDChannelizer(1:n).delta] = deal(0); [HIDChannelizer(1:n).freq] = deal(1); % default object attributes attributes = { ... % name type ranges(?) default 'available', 'boolean', [], available; ... 'active', 'boolean', [], false; ... 'FIRAdataType', 'string', [], 'gameHIDData'; ... 'HIDClass', 'string', [], 'dXgameHID'; ... 'HIDCriteria', 'struct', [], HIDCriteria; ... 'HIDChannelizer','struct', [], HIDChannelizer; ... 'HIDIndex', 'scalar', [], nan; ... 'HIDDeviceInfo','struct', [], []; ... 'HIDElementsInfo','struct', [], []; ... 'mappings', 'cell', [], {};... 'offsetTime', 'auto', [], 0; ... 'default', 'auto', [], []; ... 'other', 'auto', [], []; ... 'checkList', 'auto', [], []; ... 'checkRet', 'auto', [], []; ... 'values', 'auto', [], []; ... 'recentVal', 'auto', [], 1}; % make an array of objects from structs made from the attributes g_ = class(cell2struct(attributes(:,4), attributes(:,1), 1), 'dXgameHID'); % return the attributes, if necessary if nargout > 1 attributes_ = attributes; end % return list of batch methods if nargout > 2 batchMethods_ = {'reset', 'saveToFIRA', 'root', 'getJump'}; end
write_neuralynx_ncs.m (http://open-realtime-fmri.googlecode.com/svn/trunk/) MATLAB · 96 lines
shift_test_2D.m (http://sparse-mri-reconstruction.googlecode.com/svn/trunk/) MATLAB · 112 lines
ode8d.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 109 lines
37 end
39 %# The following tests have been added to check the function's input arguments
40 %# and output arguments
41 %!test
98 %! % ---------------------------------------------------------------------
99 %! % The figure window shows the state variables x1, x2 as well as the
100 %! % input signal u and the output signal y(=x2) of a second order lag
101 %! % implementation (cf. the control theory). The function ode8d was
102 %! % called with an option argument A that has been set before with the
odepkg_equations_secondorderlag.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 117 lines
41 if (nargin == 0)
42 help ('odepkg_equations_secondorderlag');
43 vmsg = sprintf ('Number of input arguments must be greater than zero');
44 error (vmsg);
46 elseif (nargin <= 1)
47 vmsg = sprintf ('Number of input arguments must be greater or equal than 2');
48 error (vmsg);
50 elseif (isnumeric (tvar) == false || isnumeric (yvar) == false)
51 vmsg = sprintf ('First and second input argument must be valid numeric values');
52 error (vmsg);
SFBS_FS.m (https://code.google.com/p/matbat/) MATLAB · 55 lines
15 test = (indices == foldnum);
16 train = ~test;
17 train_input = data(train,:);
18 test_input = data(test,:);
27 num = size(train_input,1);
28 [train_t,train_v] = crossvalind('HoldOut',num,0.33);
29 train_t_input = train_input(train_t,:); %???
30 train_v_input = train_input(train_v,:); %???
32 train_v_target = train_target(train_v,:); %????
34 [ FS_SFBS,CP ] = SFBS( T_SFBS,train_t_input,train_v_input,train_t_target,train_v_target);
36 % din = find(FS_SFFS); %data index??????????????????
39 FS_Final= [FS_Final;din];
41 u = train_input(:,din); %????????feasub??????????
42 v = test_input(:,din);
binaryEPGP.m (http://pmtksupport.googlecode.com/svn/trunk/) MATLAB · 54 lines
17 % covfunc is the name of the covariance function (see below)
18 % lik is the name of the likelihood function (see below)
19 % x is a n by D matrix of training inputs
20 % y is a (column) vector (of size n) of binary +1/-1 targets
21 % xstar is a nn by D matrix of test inputs
28 %
29 % The length of the vector of hyperparameters depends on the covariance
30 % function, as specified by the "covfunc" input to the function, specifying the
31 % name of a covariance function. A number of different covariance function are
32 % implemented, and it is not difficult to add new ones. See "help covFunctions"
prompt.m (http://slac-lucretia.googlecode.com/svn/trunk/) MATLAB · 87 lines
3 % s=prompt(str,options[,deflt_option]);
4 %
5 % Prompts user for input of ONE character from options string. It uses only
6 % the first character of the user's response, converted to lower case, and
7 % returns this character which will then match at least one of the characters
10 % function displays a message and prompts again.
11 %
12 % INPUTs:
13 %
14 % str = the prompt string (the list of options and a colon are
66 while (1)
67 disp(' ')
68 s=input(str,'s');
69 ns=length(s);
70 if (ns==0)
mynanmean.m (http://dotsx.googlecode.com/svn/trunk/) MATLAB · 1 lines
1 function y = mynanmean(x) %NANMEAN Average or mean ignoring NaNs. % NANMEAN(X) returns the average treating NaNs as missing values. % For vectors, NANMEAN(X) is the mean value of the non-NaN % elements in X. For matrices, NANMEAN(X) is a row vector % containing the mean value of each column, ignoring NaNs. % % See also NANMEDIAN, NANSTD, NANMIN, NANMAX, NANSUM. % Copyright (c) 1993-98 by The MathWorks, Inc. % $Revision: 2.8 $ $Date: 1997/11/29 01:45:53 $ if isempty(x) % Check for empty input. y = NaN; return end % Replace NaNs with zeros. nans = isnan(x); i = find(nans); x(i) = zeros(size(i)); if min(size(x))==1, count = length(x)-sum(nans); else count = size(x,1)-sum(nans); end % Protect against a column of all NaNs i = find(count==0); count(i) = ones(size(i)); y = sum(x)./count; y(i) = i + NaN;
SplitSequenceMarkerEntry.m (http://brainstream.googlecode.com/svn/trunk/) MATLAB · 83 lines
25 idx = sort([idx{:}]);
26 if isempty(idx)
27 error('wrong marker sequence input detected, missing items');
28 end
29 mrks{n} = regexp(mrksq{n}(1:idx(1)-1),'\S.*\S','match'); % remove leading and tailing spaces
49 [name,startidx,endidx] = regexp(sqm{n},'*\S*','match','start','end');
50 if isempty(isempty(name) || isequal(endidx,length(sqm{n})))
51 error('wrong marker sequence input detected, *-parmameter or end marker for *-parameter not found');
52 end
53 if length(name)~=1 || length(startidx)~=1 || length(endidx)~=1
54 error('wrong marker sequence input detected, multiple *-parmameter items found');
55 end
56 mrkseq{n}.marker = char(mrks{n});
irsa_dftfp.m (https://octave.svn.sourceforge.net/svnroot/octave) MATLAB · 87 lines
Lexer.ooc (git://github.com/fperrad/ooc-lua.git) Unknown · 536 lines
14 Lexer: class {
15 current: Int /* current character (charint) */
16 linenumber: Int /* input line counter */
17 lastline: Int /* line of last token `consumed' */
18 t: Token /* current token */
19 lookahead: Token /* look ahead token */
20 z: Reader /* input stream */
21 buff: ArrayList<Char> /* buffer for tokens */
22 source: String /* current source name */
25 init: func {}
27 setInput: func(=z, =source) {
28 lookahead token = TK_EOS /* no look-ahead token */
29 linenumber = 1
RemoteRunner.html
(http://datanucleus-appengine.googlecode.com/svn/trunk/)
HTML · 111 lines
✨ Summary
This HTML code is for a Selenium Remote Runner application, which allows users to run functional tests on web applications remotely. It provides features such as viewing the DOM, showing log output, and displaying command history. The interface includes buttons, checkboxes, and text areas for inputting commands and viewing results. It also contains an iframe for running the actual test.
This HTML code is for a Selenium Remote Runner application, which allows users to run functional tests on web applications remotely. It provides features such as viewing the DOM, showing log output, and displaying command history. The interface includes buttons, checkboxes, and text areas for inputting commands and viewing results. It also contains an iframe for running the actual test.
one_ray.pro
(git://github.com/charleshull6/c_soft.git)
IDL · 62 lines
✨ Summary
ONE_RAY Procedure
The one_ray
procedure draws a line with a specified starting point, length, and angle in device coordinates. It takes input parameters xcen
, ycen
, len
, and angle
, and returns the ending point of the ray as output. The procedure can be customized with optional keywords such as /NODRAW
, /DATA
, /NORMAL
, /THICK
, and /COLOR
.
ONE_RAY Procedure
The one_ray
procedure draws a line with a specified starting point, length, and angle in device coordinates. It takes input parameters xcen
, ycen
, len
, and angle
, and returns the ending point of the ray as output. The procedure can be customized with optional keywords such as /NODRAW
, /DATA
, /NORMAL
, /THICK
, and /COLOR
.
ONE_RAY Procedure
The one_ray
procedure draws a line with a specified starting point, length, and angle in device coordinates. It takes input parameters xcen
, ycen
, len
, and angle
, and returns the ending point of the ray as output. The procedure can be customized with optional keywords such as /NODRAW
, /DATA
, /NORMAL
, /THICK
, and /COLOR
.
ONE_RAY Procedure
The one_ray
procedure draws a line with a specified starting point, length, and angle in device coordinates. It takes input parameters xcen
, ycen
, len
, and angle
, and returns the ending point of the ray as output. The procedure can be customized with optional keywords such as /NODRAW
, /DATA
, /NORMAL
, /THICK
, and /COLOR
.
10 ; one_ray, xcen, ycen, len, angle, terminus, /NODRAW ]
11 ;
12 ; INPUT PARAMETERS:
13 ; xcen, ycen = starting point in device coordinates, floating point
14 ; scalars
20 ; coordinates
21 ;
22 ; OPTIONAL KEYWORD INPUT PARAMETERS:
23 ; /nodraw if non-zero, the ray is not actually drawn, but the terminus
24 ; is still calculated
KOLMIDITYPE.PAS
(git://github.com/rofl0r/KOL.git)
Pascal · 102 lines
✨ Summary
This Pascal code defines a set of types and functions for working with MIDI (Musical Instrument Digital Interface) data on a Windows platform. It provides classes and procedures for creating and managing MIDI events, including sending and receiving MIDI messages, as well as handling sysex (system exclusive) data. The code is designed to be used in a KOL (Kolmogorov Object Language) application.
This Pascal code defines a set of types and functions for working with MIDI (Musical Instrument Digital Interface) data on a Windows platform. It provides classes and procedures for creating and managing MIDI events, including sending and receiving MIDI messages, as well as handling sysex (system exclusive) data. The code is designed to be used in a KOL (Kolmogorov Object Language) application.