plateform stringclasses 1
value | repo_name stringlengths 13 113 | name stringlengths 3 74 | ext stringclasses 1
value | path stringlengths 12 229 | size int64 23 843k | source_encoding stringclasses 9
values | md5 stringlengths 32 32 | text stringlengths 23 843k |
|---|---|---|---|---|---|---|---|---|
github | xyza11808/MATLAB-master | SimpleROI_Draw_GUI.m | .m | MATLAB-master/SimpleROI_Draw_GUI.m | 32,958 | utf_8 | 13921a9ac90084594379c39132861a91 | function varargout = SimpleROI_Draw_GUI(varargin)
% SIMPLEROI_DRAW_GUI MATLAB code for SimpleROI_Draw_GUI.fig
% SIMPLEROI_DRAW_GUI, by itself, creates a new SIMPLEROI_DRAW_GUI or raises the existing
% singleton*.
%
% H = SIMPLEROI_DRAW_GUI returns the handle to a new SIMPLEROI_DRAW_GUI or the handle to
%... |
github | xyza11808/MATLAB-master | uTest_Shuffle.m | .m | MATLAB-master/uTest_Shuffle.m | 17,327 | utf_8 | 34f8bba147f0ea796e6c850c5907d329 | function uTest_Shuffle(doSpeed, doBias)
% Automatic test: Shuffle
% This is a routine for automatic testing. It is not needed for processing and
% can be deleted or moved to a folder, where it does not bother.
%
% uTest_Shuffle(doSpeed, doBias)
% INPUT:
% doSpeed: Optional logical flag to trigger time consuming speed... |
github | xyza11808/MATLAB-master | OptoContNMComparePlot.m | .m | MATLAB-master/OptoContNMComparePlot.m | 3,712 | utf_8 | 3adb73e2c1917f93de843c3505cb9ca8 | function OptoContNMComparePlot(AlignData,TrFreq,TrOutcome,TrChoice,AlignF,Frate,TrModu,varargin)
% this function is tried to handle the sessions with optal trials, and plot
% the comparison plot for optical neurometic and control neurometric curve
% only random pure tone session data can be handled for equal fraction o... |
github | xyza11808/MATLAB-master | tfagui.m | .m | MATLAB-master/tfagui.m | 9,813 | utf_8 | 1964dd8433aa912eb0ee7f3204487278 | %AOK TFR 2.0
%Deming Zhang
%deming.zhang@gmail.com
%
function varargout = tfagui(varargin)
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @TFA_OpeningFcn, ...... |
github | xyza11808/MATLAB-master | CP_And_dprime_cal.m | .m | MATLAB-master/CP_And_dprime_cal.m | 3,224 | utf_8 | 0a6913e24a71a1d7e28ed3ad6d487475 | function CP_And_dprime_cal(RawData,TrialFreq,AlignFrame,TimeLength,FrameRate,ActionChoice,varargin)
% this function will be used for calculating choice probability and d prime
% for single ROI and return its result
if nargin > 6
freqBound = 16000; % default boundary frequency
else
freqBound = varargin{1};
... |
github | xyza11808/MATLAB-master | BaseFluoCorrection.m | .m | MATLAB-master/BaseFluoCorrection.m | 2,802 | utf_8 | 64859301b8c94d185db28c2e338b9dc6 |
function BaseFluoCorrection(varargin)
%this function is used for correction the fluorescence change during the
%whole imaging session, using the mean value for each frame as the raw
%signal to do the correction
%with the largest input option as: BaseFluoCorrection(winNumber,)
if nargin>=1
winNumber=varargin{1};
e... |
github | xyza11808/MATLAB-master | RF2afcComparePlot.m | .m | MATLAB-master/RF2afcComparePlot.m | 7,645 | utf_8 | 476f2d81173e3177c532c90b83236342 | function RF2afcComparePlot(TaskData,TaskStim,RFdata,RFstim,FrameRate,AlignFrame,TimeScale,varargin)
% this function is tried to compare task and rf data response value and put
% in a scatter plot to show the final result
% also this function will tried to class ROIs as sound responsive ROI or an
% non-direct sound resp... |
github | xyza11808/MATLAB-master | question_dlg.m | .m | MATLAB-master/question_dlg.m | 7,092 | utf_8 | 75ad574a41c0ddf01c426e00e2ba3a51 | function varargout = question_dlg(varargin)
% QUESTION_DLG MATLAB code for question_dlg.fig
% QUESTION_DLG by itself, creates a new QUESTION_DLG or raises the
% existing singleton*.
%
% H = QUESTION_DLG returns the handle to a new QUESTION_DLG or the handle to
% the existing singleton*.
%
% QUE... |
github | xyza11808/MATLAB-master | RandPTROCSelectivity.m | .m | MATLAB-master/RandPTROCSelectivity.m | 12,863 | utf_8 | 8d56bc8fd213b82ed2569ad760591def | function RandPTROCSelectivity(AlignedData,FreqType,AlignPoint,Framerate,varargin)
%this function will be used for multiple frequency ROC analysis and tyr to
%check ROI's discrimination ability based on ROC result
if nargin > 4
ModuIndex=varargin{1}; %if any modulation exists, plot the difference for two types
else... |
github | xyza11808/MATLAB-master | makeStructFromNode.m | .m | MATLAB-master/makeStructFromNode.m | 489 | utf_8 | 05200be844e7189cee1a748d2316c43b | % ----- Local function MAKESTRUCTFROMNODE -----
function nodeStruct = makeStructFromNode(theNode)
% Create structure of node info.
nodeStruct = struct( ...
'Name', char(theNode.getNodeName), ...
'Attributes', parseAttributes(theNode), ...
'Data', '', ... |
github | xyza11808/MATLAB-master | ftSel_SVMRFECBR.m | .m | MATLAB-master/ftSel_SVMRFECBR.m | 6,530 | utf_8 | 8e8d904539079e47d0b9f0c3b4f754ea | function [ftRank,ftScore] = ftSel_SVMRFECBR(ft,label,param)
% Feature selection using SVM-recursive feature elimination (SVM-RFE) with
% correlation bias reduction (CBR). LIBSVM is needed.
% CBR is designed to deal with the problem in SVM-RFE when lots of highly
% correlated features exist.
% Only tested on binary-cl... |
github | xyza11808/MATLAB-master | boundedline.m | .m | MATLAB-master/boundedline.m | 10,932 | utf_8 | cda0c1e3f0cd78568120d513ca9571f3 | function varargout = boundedline(varargin)
%BOUNDEDLINE Plot a line with shaded error/confidence bounds
%
% [hl, hp] = boundedline(x, y, b)
% [hl, hp] = boundedline(x, y, b, linespec)
% [hl, hp] = boundedline(x1, y1, b1, linespec1, x2, y2, b2, linespec2)
% [hl, hp] = boundedline(..., 'alpha')
% [hl, hp] = boundedline(... |
github | xyza11808/MATLAB-master | Findpeak_WWds.m | .m | MATLAB-master/Findpeak_WWds.m | 38,290 | utf_8 | 9d84ce4eb66ef4ba911c3430527f3367 | function [Ypk,Xpk,Wpk,Ppk,wxPk] = Findpeak_WWds(Yin,varargin)
%FINDPEAKS Find local peaks in data
% PKS = FINDPEAKS(Y) finds local peaks in the data vector Y. A local peak
% is defined as a data sample which is either larger than the two
% neighboring samples or is equal to Inf.
%
% [PKS,LOCS]= FINDPEAKS(Y) als... |
github | xyza11808/MATLAB-master | HDwave_analysis.m | .m | MATLAB-master/HDwave_analysis.m | 1,121 | utf_8 | efc63172b0954cb5ae59024ba5955681 |
function HDwave_analysis(data,fs,time,filename,chioce)
%HDwave_analysis used for high dimension data which contains multi-trial
%analysis and return the overall results of overall result in the given
%filename make under the active path
%the given data should no more than three dimensions
%origin from XIN Yu
if nargi... |
github | xyza11808/MATLAB-master | lars_regression_noise.m | .m | MATLAB-master/constrained-foopsi-master/lars_regression_noise.m | 7,310 | utf_8 | 57b6188ceb2fc027c7e65b5a96aac472 | function [Ws, lambdas, W_lam, lam, flag] = lars_regression_noise(Y, X, positive, noise)
% run LARS for regression problems with LASSO penalty, with optional positivity constraints
% Author: Eftychios Pnevmatikakis. Adapted code from Ari Pakman
% Input Parameters:
% Y: Y(:,t) is the observed data at time ... |
github | xyza11808/MATLAB-master | pdftops.m | .m | MATLAB-master/export_fig/pdftops.m | 7,301 | utf_8 | 8ada403c52d45d5dad03264fcfcec4b7 | function varargout = pdftops(cmd)
%PDFTOPS Calls a local pdftops executable with the input command
%
% Example:
% [status result] = pdftops(cmd)
%
% Attempts to locate a pdftops executable, finally asking the user to
% specify the directory pdftops was installed into. The resulting path is
% stored for future refere... |
github | xyza11808/MATLAB-master | crop_borders.m | .m | MATLAB-master/export_fig/crop_borders.m | 5,158 | utf_8 | 4efed5521f03ab70ce39e06701eed18a | function [A, vA, vB, bb_rel] = crop_borders(A, bcol, padding, crop_amounts)
%CROP_BORDERS Crop the borders of an image or stack of images
%
% [B, vA, vB, bb_rel] = crop_borders(A, bcol, [padding])
%
%IN:
% A - HxWxCxN stack of images.
% bcol - Cx1 background colour vector.
% padding - scalar indicating how much... |
github | xyza11808/MATLAB-master | isolate_axes.m | .m | MATLAB-master/export_fig/isolate_axes.m | 5,486 | utf_8 | f18b045446ffb51b2f1920cc3ac29ab9 | function fh = isolate_axes(ah, vis)
%ISOLATE_AXES Isolate the specified axes in a figure on their own
%
% Examples:
% fh = isolate_axes(ah)
% fh = isolate_axes(ah, vis)
%
% This function will create a new figure containing the axes/uipanels
% specified, and also their associated legends and colorbars. The objects
%... |
github | xyza11808/MATLAB-master | im2gif.m | .m | MATLAB-master/export_fig/im2gif.m | 7,413 | utf_8 | f09a59e5fd22ac4e0674b3c89bb053b2 | %IM2GIF Convert a multiframe image to an animated GIF file
%
% Examples:
% im2gif infile
% im2gif infile outfile
% im2gif(A, outfile)
% im2gif(..., '-nocrop')
% im2gif(..., '-nodither')
% im2gif(..., '-ncolors', n)
% im2gif(..., '-loops', n)
% im2gif(..., '-delay', n)
%
% This function converts a mu... |
github | xyza11808/MATLAB-master | read_write_entire_textfile.m | .m | MATLAB-master/export_fig/read_write_entire_textfile.m | 924 | utf_8 | 779e56972f5d9778c40dee98ddbd677e | %READ_WRITE_ENTIRE_TEXTFILE Read or write a whole text file to/from memory
%
% Read or write an entire text file to/from memory, without leaving the
% file open if an error occurs.
%
% Reading:
% fstrm = read_write_entire_textfile(fname)
% Writing:
% read_write_entire_textfile(fname, fstrm)
%
%IN:
% fname - Pathn... |
github | xyza11808/MATLAB-master | pdf2eps.m | .m | MATLAB-master/export_fig/pdf2eps.m | 1,648 | utf_8 | cbf3ee6801a32b1e1b87764248465760 | %PDF2EPS Convert a pdf file to eps format using pdftops
%
% Examples:
% pdf2eps source dest
%
% This function converts a pdf file to eps format.
%
% This function requires that you have pdftops, from the Xpdf suite of
% functions, installed on your system. This can be downloaded from:
% http://xpdfreader.com
%
% Inp... |
github | xyza11808/MATLAB-master | print2array.m | .m | MATLAB-master/export_fig/print2array.m | 16,645 | utf_8 | f590c311d695549db16be60c60ea70a3 | function [A, bcol, alpha] = print2array(fig, res, renderer, gs_options)
%PRINT2ARRAY Exports a figure to a bitmap RGB image array
%
% Examples:
% A = print2array
% A = print2array(figure_handle)
% A = print2array(figure_handle, resolution)
% A = print2array(figure_handle, resolution, renderer)
% A = print2ar... |
github | xyza11808/MATLAB-master | append_pdfs.m | .m | MATLAB-master/export_fig/append_pdfs.m | 6,523 | utf_8 | a4ef1d608af8b9711b98a3b094f95c90 | function append_pdfs(varargin)
%APPEND_PDFS Appends/concatenates multiple PDF files
%
% Usage example:
% append_pdfs(outputFilename, inputFilename1, inputFilename2, ...)
% append_pdfs(outputFilename, inputFilenames_list{:})
% append_pdfs(outputFilename, inputFilenames_cell_or_string_array)
% append_pdfs output.... |
github | xyza11808/MATLAB-master | using_hg2.m | .m | MATLAB-master/export_fig/using_hg2.m | 1,064 | utf_8 | a1883d15c4304cd0ac406c117e3047ea | %USING_HG2 Determine if the HG2 graphics engine is used
%
% tf = using_hg2(fig)
%
%IN:
% fig - handle to the figure in question.
%
%OUT:
% tf - boolean indicating whether the HG2 graphics engine is being used
% (true) or not (false).
% 19/06/2015 - Suppress warning in R2015b; cache result for improved per... |
github | xyza11808/MATLAB-master | eps2pdf.m | .m | MATLAB-master/export_fig/eps2pdf.m | 13,839 | utf_8 | 509a6551334a3cf7c410e2ca0d98cf6f | function eps2pdf(source, dest, crop, append, gray, quality, gs_options)
%EPS2PDF Convert an eps file to pdf format using ghostscript
%
% Examples:
% eps2pdf source dest
% eps2pdf(source, dest, crop)
% eps2pdf(source, dest, crop, append)
% eps2pdf(source, dest, crop, append, gray)
% eps2pdf(source, dest, crop... |
github | xyza11808/MATLAB-master | export_fig.m | .m | MATLAB-master/export_fig/export_fig.m | 136,112 | utf_8 | fc8f1980ad084df6f119612b16286c42 | function [imageData, alpha] = export_fig(varargin) %#ok<*STRCL1>
%EXPORT_FIG Exports figures in a publication-quality format
%
% Examples:
% imageData = export_fig
% [imageData, alpha] = export_fig
% export_fig filename
% export_fig filename -format1 -format2
% export_fig ... -nocrop
% export_fig ... -c[<v... |
github | xyza11808/MATLAB-master | ghostscript.m | .m | MATLAB-master/export_fig/ghostscript.m | 8,296 | utf_8 | 4f0e9071f894361b54efeec2a89de95c | function varargout = ghostscript(cmd)
%GHOSTSCRIPT Calls a local GhostScript executable with the input command
%
% Example:
% [status result] = ghostscript(cmd)
%
% Attempts to locate a ghostscript executable, finally asking the user to
% specify the directory ghostcript was installed into. The resulting path
% is s... |
github | xyza11808/MATLAB-master | fix_lines.m | .m | MATLAB-master/export_fig/fix_lines.m | 6,290 | utf_8 | 8437006b104957762090e3d875688cb6 | %FIX_LINES Improves the line style of eps files generated by print
%
% Examples:
% fix_lines fname
% fix_lines fname fname2
% fstrm_out = fixlines(fstrm_in)
%
% This function improves the style of lines in eps files generated by
% MATLAB's print function, making them more similar to those seen on
% screen. Grid ... |
github | xyza11808/MATLAB-master | Cusum.m | .m | MATLAB-master/sigTOOL/sigTOOL Neuroscience Toolkit/Spike Train Toolkit/utils/private/Cusum.m | 850 | utf_8 | 8cf244500bd1e1eb0a312b489cc6652e | %--------------------------------------------------------------------------
function Cusum(hObject, EventData) %#ok<INUSD>
%--------------------------------------------------------------------------
[fhandle, ax, result, subs, data]=callbackgetparam(hObject);
x=data.tdata;
% Find bins at t<0, use only first half
idx=da... |
github | xyza11808/MATLAB-master | menu_InterfaceTo_wave_clus.m | .m | MATLAB-master/sigTOOL/sigTOOL Neuroscience Toolkit/Spike Train Toolkit/menu_Spike Sorting/menu_InterfaceTo_wave_clus.m | 24,524 | utf_8 | d5af04f48e3933b64d87125660e105a8 | function varargout=menu_InterfaceTo_wave_clus(varargin)
% menu_InterfaceTo_wave_clus interface to the Wave_clus spike sorter
%
% Wave_clus is a package for unsupervised spike detection and sorting and
% is available from
% http://www.vis.caltech.edu/~rodri/Wave_clus/Wave_clus_home.htm
% It is not included in the sigTOO... |
github | xyza11808/MATLAB-master | cvManager.m | .m | MATLAB-master/sigTOOL/program/menu_Waveform/menu_ChannelViewer/cvManager.m | 1,637 | utf_8 | 3daa516e8ae45605b9b18cf6065dcedf | function [tp]=cvManager(fhandle, updateflag)
figure(fhandle);
% Check if tree is already present
s=getappdata(fhandle, 'cvManager');
if nargin==1 && ~isempty(s) || nargin==2 && updateflag==false
tp=s.Panel;
return
elseif nargin==2 && updateflag==true
% Delete and recreate
delete(s.Panel);
end
if sc... |
github | xyza11808/MATLAB-master | cvUserWindow1.m | .m | MATLAB-master/sigTOOL/program/menu_Waveform/menu_ChannelViewer/cvUserWindow1.m | 5,597 | utf_8 | 12e14a1a4014935739de9116366b8c41 | function chan=cvUserWindow1(fhandle, chan)
[fhandle channels]=scParam(fhandle);
setappdata(fhandle, 'ScrollSpeed', 20);
% Set up the control panel
h=findobj(fhandle, 'Tag', 'CV:ManagerPanel');
if strcmp(get(h, 'Type'),'hgjavacomponent')
% Old style uitable
h=get(h, 'UserData');
end
pos=get(h, 'Position');
... |
github | xyza11808/MATLAB-master | cvRawDataAxis.m | .m | MATLAB-master/sigTOOL/program/menu_Waveform/menu_ChannelViewer/cvRawDataAxis.m | 3,832 | utf_8 | 99096057b928b81214c391b37393f077 | function cvRawDataAxis(fhandle, startindex)
[fhandle channels]=scParam(fhandle);
chan=getappdata(fhandle, 'thisChannel');
% Extract the data
data=channels{chan};
y=data.adc();
x=getTimeVector(data, 'seconds');
% TODO: This temporary fix ensures data always starts at time zero
x=x-x(1);
setappdata(fhandle, 'xdata',... |
github | xyza11808/MATLAB-master | ScrollControls.m | .m | MATLAB-master/sigTOOL/program/menu_Waveform/menu_ChannelViewer/private/ScrollControls.m | 3,636 | utf_8 | 604a357b4cfec96085bc49e546c4e2f2 | function s=ScrollControls(panel)
s.scroll=uipanel(panel, 'Units', 'normalized',...
'Position', [0.9-0.225 0.375 0.225 0.1],...
'ForeGroundColor', [0 0 0.7],...
'Title', 'Scroll');
if ismac
set(s.scroll, 'BackgroundColor', [.95 .95 .95]);
end
set(s.scroll, 'Units', 'pixels');
pos=get(s.scroll, 'Position... |
github | xyza11808/MATLAB-master | scExportFigure.m | .m | MATLAB-master/sigTOOL/CORE/utils/scExportFigure.m | 4,975 | UNKNOWN | 5e4df0cac407a2b0447d5474f43caba0 | function scExportFigure(fhandle, varargin)
% scExportFigure - exports a sigTOOL view to a graphics file
%
% Example:
% scExportFigure(fhandle, varargin)
% where fhandle is the handle of the data view or sigTOOL result figure
% varargin{1}, optionally, contains the default target file extension
%
% -----------------... |
github | xyza11808/MATLAB-master | help2doc.m | .m | MATLAB-master/sigTOOL/CORE/utils/help2doc.m | 21,691 | utf_8 | a0f72fb468c235f1172e607e2ea3a411 | function [NoHelp, index, count]=help2doc(targetdir, fh1, fh2, index, count, h, NoHelp)
% HELP2DOC copies help text for all m-files in a folder (and subfolders)
% to an HTML file
%
% Examples:
% HELP2DOC()
% HELP2DOC(foldername)
%
% LIST=HELP2DOC(...)
% returns a list containing the names of files that lack any help te... |
github | xyza11808/MATLAB-master | jcontrolDemo.m | .m | MATLAB-master/sigTOOL/CORE/utils/jcontrolDemo.m | 2,714 | utf_8 | b409780542b8edca8631f40e2ddeb1d9 | function jcontrolDemo()
% jcontrolDemo()
%
% Example:
% jcontrolDemo()
%
% 30.08.07 Revised for backwards compatability with MATLAB 7.01 onwards
disp(' ');
disp('Tested on R2007a: If you are using an older copy of MATLAB and this demo fails,');
disp('see README.TXT or http://www.mathworks.com/matlabcentral/fileexchange... |
github | xyza11808/MATLAB-master | scverLessThan.m | .m | MATLAB-master/sigTOOL/CORE/utils/scverLessThan.m | 503 | utf_8 | 7265cc905f4367909f5015fc65119241 | function result=scverLessThan(toolboxstr, verstr)
% scverLessThan is needed for MATLAB versions without the verLessThan function
try
result=verLessThan(toolboxstr, verstr);
catch
toolboxver = ver(toolboxstr);
toolboxParts = getParts(toolboxver(1).Version);
verParts = getParts(verstr);
result =... |
github | xyza11808/MATLAB-master | scPrepareResult.m | .m | MATLAB-master/sigTOOL/CORE/utils/ResultView/scPrepareResult.m | 2,030 | utf_8 | dcb9a4dd09659f4557d1711dcb884632 | function Q=scPrepareResult(P, varargin)
% scPrepareResult builds a cell matrix for use with sigTOOLResultData objects
if nargin<=3
if iscell(varargin{1})
ChannelList=varargin{1};
else
ChannelList={varargin{1}};
end
if nargin==3
channels=varargin{2};
end
elseif nargin==4
... |
github | xyza11808/MATLAB-master | Options3D.m | .m | MATLAB-master/sigTOOL/CORE/utils/ResultView/ResultManager/private/Options3D.m | 2,828 | utf_8 | 02fcd8b5a33c09c79d7d778951af7a0a | function tp=Options3D(tp)
Foreground=java.awt.Color(64/255,64/255,122/255);
Background=java.awt.Color(1,1,0.9);
p=uipanel('Parent', tp.Panel.uipanel,...
'Units', 'normalized',...
'Position',[0.05 0.62 0.85 0.1375]);
tp.Options3D.Panel=jcontrol(p, 'javax.swing.JPanel',...
'Units', 'normalized',...
'Pos... |
github | xyza11808/MATLAB-master | AxesFeatures.m | .m | MATLAB-master/sigTOOL/CORE/utils/ResultView/ResultManager/private/AxesFeatures.m | 4,594 | utf_8 | a5fb51b2821d3b60d81c93cebd3715b9 | function tp=AxesFeatures(tp)
Foreground=java.awt.Color(64/255,64/255,122/255);
Background=java.awt.Color(1,1,0.9);
p=uipanel('Parent', tp.Panel.uipanel,...
'Units', 'normalized',...
'Position',[0.05 0.18 0.85 0.24],...
'Tag', 'sigTOOLResultManagerAxesFeatures');
tp.AxesFeatures.Panel=jcontrol(p, 'javax.sw... |
github | xyza11808/MATLAB-master | LineColorCallback.m | .m | MATLAB-master/sigTOOL/CORE/utils/ResultView/ResultManager/private/LineColorCallback.m | 1,169 | utf_8 | 81870530be278f597563e028c41ac39f | function LineColorCallback(hObject, EventData) %#ok<INUSD>
fhandle=ancestor(handle(hObject.hghandle),'figure');
s=jvPanel('Title', 'Line Color',...
'Position',[0.25 0.25 0.5 0.5]);
s=jvElement(s, 'Component', 'javax.swing.JColorChooser',...
'Label', 'ColorChooser',...
'Position',[0 0.2 1 0.8]);
s=jvElement(... |
github | xyza11808/MATLAB-master | ResetView.m | .m | MATLAB-master/sigTOOL/CORE/utils/ResultView/ResultManager/private/ResetView.m | 1,107 | utf_8 | a33fc4ce366a52acc33ff63a0f6946c1 | function tp=ResetView(tp)
Foreground=java.awt.Color(64/255,64/255,122/255);
Background=java.awt.Color(1,1,0.9);
tp.CameraTool=jcontrol(tp.Panel, 'javax.swing.JButton',...
'Position',[0.1 0.125 0.8 0.025],...
'Text','Reset View',...
'Foreground', Foreground,...
'Background', Background);
tp.CameraTool.M... |
github | xyza11808/MATLAB-master | AxesLimits.m | .m | MATLAB-master/sigTOOL/CORE/utils/ResultView/ResultManager/private/AxesLimits.m | 4,398 | utf_8 | a4607d55e97d21b02734b7f7aa628b58 | function tp=AxesLimits(tp)
Foreground=java.awt.Color(64/255,64/255,122/255);
Background=java.awt.Color(1,1,0.9);
p=uipanel('Parent', tp.Panel.uipanel,...
'Units', 'normalized',...
'Position',[0.05 0.425 0.85 0.2],...
'Tag', 'sigTOOLResultManagerAxesLimits');
tp.AxesLimits.Panel=jcontrol(p, 'javax.swing.JP... |
github | xyza11808/MATLAB-master | CameraTool.m | .m | MATLAB-master/sigTOOL/CORE/utils/ResultView/ResultManager/private/CameraTool.m | 1,139 | utf_8 | 37c6bffb801247305bde8d1bd6460cdf | function tp=CameraTool(tp)
Foreground=java.awt.Color(64/255,64/255,122/255);
Background=java.awt.Color(1,1,0.9);
tp.CameraTool=jcontrol(tp.Panel, 'javax.swing.JButton',...
'Position',[0.1 0.15 0.8 0.025],...
'Text','Camera Tool',...
'Foreground', Foreground,...
'Background', Background);
tp.CameraTool.... |
github | xyza11808/MATLAB-master | extractPhase.m | .m | MATLAB-master/sigTOOL/CORE/utils/@scchannel/extractPhase.m | 6,047 | utf_8 | 524fbdce00d703562420759fe91199d4 | function out=extractPhase(trig, events)
out=[];
error('Obsolete');
progbar=scProgressBar(0, 'Setting up....', 'Name', 'Event Correlation/PETH',...
'Progbar','off');
for tr=1:length(Trigger)
thistrigger=Trigger(tr);
% Find the trigger times from the trigger channels
trig=getValidTriggers(channels{thist... |
github | xyza11808/MATLAB-master | jvSetHelp.m | .m | MATLAB-master/sigTOOL/CORE/utils/uifunctions/jvSetHelp.m | 704 | utf_8 | 1fa6fb1fd7bcfaf38ed035d4838d3f15 | function h=jvSetHelp(h, varargin)
%
% Examples:
% h=jvSetHelp(h, HelpFileName)
% h=jvSetHelp(h, CallingFunctionName, HelpFileName)
if nargin==2
st=dbstack('-completenames');
mfile=st(2).file;
markup=varargin{1};
else
mfile=varargin{1};
markup=varargin{2};
mfile=which(mfile);
end
path=fil... |
github | xyza11808/MATLAB-master | jvLinkChannelSelectors.m | .m | MATLAB-master/sigTOOL/CORE/utils/uifunctions/jvLinkChannelSelectors.m | 3,700 | utf_8 | 9dd1bbdf32706d63d6ee634ca168aaf5 | function jvLinkChannelSelectors(h, linkmethod)
% jvLinkChannelSelectors links the Channel B selection to the Channel A
if ~iscell(h)
h={h};
end
if nargin<2
linkmethod='all';
end
switch lower(linkmethod)
% Supported link methods
case 'all'
set(h{1}.ChannelA, 'ActionPerformedCallback', {@All,... |
github | xyza11808/MATLAB-master | jvCreateUI.m | .m | MATLAB-master/sigTOOL/CORE/utils/uifunctions/jvCreateUI.m | 9,597 | utf_8 | bc6e40814449b9cd10aeaf3bd46f73d4 | function h=jvCreateUI(h, ItemType, Label, ToolTip, Position, ListItems, ReturnValues)
% jvCreateUI helper function for sigTOOL GUI creation routines
parent=h.Panel;
fhandle=ancestor(h.Panel,'figure');
fname=Label;
fname=jvMakeFieldName(fname);
% Constants
% TODO: take these from the preferences file?
Foreground=java.a... |
github | xyza11808/MATLAB-master | scInsertLogo.m | .m | MATLAB-master/sigTOOL/CORE/utils/DataView/scInsertLogo.m | 1,554 | utf_8 | d366636d65bdfe63df2e2fe2e7f659d6 | function scInsertLogo(varargin)
% scInsertLogo places the sigTOOL logo in a data view
if ishandle(varargin{1}) && ~strcmp(get(varargin{1},'type'), 'figure')
C=imread('Logo.bmp');
logo(varargin{1}, C);
end
if ~strcmp(class(varargin{1}),'timer')
fhandle=varargin{1};
if isempty(findobj(gcf,'Tag','sigTOOL... |
github | xyza11808/MATLAB-master | sigTOOLResultData.m | .m | MATLAB-master/sigTOOL/CORE/utils/@sigTOOLResultData/sigTOOLResultData.m | 2,051 | utf_8 | 5b81764f830a192d6975289ddf92a961 | function obj=sigTOOLResultData(varargin)
% sigTOOLResultData constructor
%
% Overloaded methods:
%
%
%
% Revisions:
% 11.09.09 Add datasourcetitle field
if nargin==0
s.acktext='';
s.data={};
s.datasource= [];
s.datasourcetitle= '';
s.description= [];
s.details= [];
s.displaymode='Single Fr... |
github | xyza11808/MATLAB-master | mrelnet.m | .m | MATLAB-master/glmnet_matlab/mrelnet.m | 2,585 | utf_8 | 2f946c92aba76c5b8ef746baed5e437c | function fit = mrelnet(x,is_sparse,irs,pcs,y,weights,offset,parm,nobs,nvars,...
jd,vp,cl,ne,nx,nlam,flmin,ulam,thresh,isd,jsd,intr,maxit,family)
nr = size(y, 2);
wym = wtmean(y, weights);
nulldev = sum(wtmean(bsxfun(@minus,y,wym).^2,weights)*sum(weights));
if isempty(offset)
offset = y * 0;
is_offset = f... |
github | xyza11808/MATLAB-master | coxnet.m | .m | MATLAB-master/glmnet_matlab/coxnet.m | 1,563 | utf_8 | 895747785766daa2c82975f3d019dd18 | function fit = coxnet(x,is_sparse,irs,pcs,y,weights,offset,parm,nobs,nvars,...
jd,vp,cl,ne,nx,nlam,flmin,ulam,thresh,isd,maxit,family)
% Internal glmnet function. See also glmnet, cvglmnet.
%time --- column 1
%status --- column 2
ty = y(:,1);
tevent = y(:,2);
if (any(ty <= 0))
error('negative event times enc... |
github | xyza11808/MATLAB-master | err.m | .m | MATLAB-master/glmnet_matlab/err.m | 3,764 | utf_8 | eeab9274fcf914b604c55eb4ec2a867a | function output = err(n,maxit,pmax,family)
if n==0
output.n=0;
output.fatal=false;
output.msg='';
else
switch family
case 'gaussian'
output = err_elnet(n,maxit,pmax);
case 'binomial'
output = err_lognet(n,maxit,pmax);
case 'multinomial'
ou... |
github | xyza11808/MATLAB-master | glmnetPlot.m | .m | MATLAB-master/glmnet_matlab/glmnetPlot.m | 7,609 | utf_8 | 12fcbd8fb5cafce7d419403fcfab5649 | function glmnetPlot( x, xvar, label, type, varargin )
%--------------------------------------------------------------------------
% glmnetPlot.m: plot coefficients from a "glmnet" object
%--------------------------------------------------------------------------
%
% DESCRIPTION:
% Produces a coefficient profile plo... |
github | xyza11808/MATLAB-master | glmnetPredict.m | .m | MATLAB-master/glmnet_matlab/glmnetPredict.m | 16,486 | utf_8 | 58bccedbf1d9b31e6c7b0e05d2058f3d | function result = glmnetPredict(object, newx, s, type, exact, offset)
%--------------------------------------------------------------------------
% glmnetPredict.m: make predictions from a "glmnet" object.
%--------------------------------------------------------------------------
%
% DESCRIPTION:
% Similar to othe... |
github | xyza11808/MATLAB-master | fishnet.m | .m | MATLAB-master/glmnet_matlab/fishnet.m | 1,567 | utf_8 | a38133450377adad1e403b48017b5d9e | function fit = fishnet(x,is_sparse,irs,pcs,y,weights,offset,parm,nobs,nvars,...
jd,vp,cl,ne,nx,nlam,flmin,ulam,thresh,isd,intr,maxit,family)
if any(y < 0)
error('negative responses encountered; not permitted for Poisson family');
end
if isempty(offset)
offset = y * 0;
is_offset = false;
else
is_o... |
github | xyza11808/MATLAB-master | cvmrelnet.m | .m | MATLAB-master/glmnet_matlab/cvmrelnet.m | 2,101 | utf_8 | d369fd63346be95c8ff0d36501321ea1 | function result = cvmrelnet(object, lambda, x, y, weights, offset, foldid, ...
type, grouped, keep)
if nargin < 10 || isempty(keep)
keep = false;
end
typenames = struct('deviance','Mean-Squared Error','mse','Mean-Squared Error',...
'mae','Mean Absolute Error');
if strcmp(type,'default')
type = 'mse';... |
github | xyza11808/MATLAB-master | cvmultnet.m | .m | MATLAB-master/glmnet_matlab/cvmultnet.m | 2,980 | utf_8 | 245d373006161331bd149a8cc0756fcd | function result = cvmultnet(object, lambda, x, y, weights, offset, foldid, ...
type, grouped, keep)
if nargin < 10 || isempty(keep)
keep = false;
end
typenames = struct('mse','Mean-Squared Error','mae','Mean Absolute Error',...
'deviance','Multinomial Deviance','class','Misclassification Error');
if strc... |
github | xyza11808/MATLAB-master | lognet.m | .m | MATLAB-master/glmnet_matlab/lognet.m | 4,177 | utf_8 | c749bb59e945862ae7b1962afc11fbfc | function fit = lognet(x,is_sparse,irs,pcs,y,weights,offset,parm,nobs,nvars,...
jd,vp,cl,ne,nx,nlam,flmin,ulam,thresh,isd,intr,maxit,kopt,family)
[noo,nc] = size(y);
if noo ~= nobs
error('x and y have different number of rows in call to glmnet');
end
if nc == 1
[classes,~,sy] = unique(y);
nc = length(cl... |
github | xyza11808/MATLAB-master | elnet.m | .m | MATLAB-master/glmnet_matlab/elnet.m | 1,671 | utf_8 | 5e93be0d78726b154d27eed1f02e36be | function fit = elnet(x, is_sparse, irs, pcs, y, weights, offset, gtype, ...
parm, lempty, nvars, jd, vp, cl, ne, nx, nlam, flmin, ulam, thresh, ...
isd, intr, maxit, family)
ybar = y' * weights/ sum(weights);
nulldev = (y' - ybar).^2 * weights;
ka = find(strncmp(gtype,{'covariance','naive'},length(gtype)),1);
... |
github | xyza11808/MATLAB-master | cvcoxnet.m | .m | MATLAB-master/glmnet_matlab/cvcoxnet.m | 2,338 | utf_8 | eed15cafcfb188d8f0abde603f2b3ee9 | function result = cvcoxnet(object, lambda, x, y, weights, offset, foldid, ...
type, grouped, keep)
% Internal glmnet function. See also cvglmnet.
if nargin < 10 || isempty(keep)
keep = false;
end
typenames = struct('deviance','Partial Likelihood Deviance');
if strcmp(type, 'default')
type = 'deviance';
e... |
github | xyza11808/MATLAB-master | cvfishnet.m | .m | MATLAB-master/glmnet_matlab/cvfishnet.m | 1,872 | utf_8 | d7cb4820ff676ff3db1adcb0418e402f | function result = cvfishnet(object,lambda,x,y,weights,offset,foldid,type,grouped,keep)
% Internal glmnet function. See also cvglmnet.
if nargin < 10 || isempty(keep)
keep = false;
end
typenames = struct('mse','Mean-Squared Error','mae','Mean Absolute Error','deviance','Poisson Deviance');
if strcmp(type, 'defaul... |
github | xyza11808/MATLAB-master | cvlognet.m | .m | MATLAB-master/glmnet_matlab/cvlognet.m | 4,184 | utf_8 | 265205120a633a060736651a5eee583d | function result = cvlognet(object, lambda, x, y, weights, offset, foldid, ...
type, grouped, keep)
if nargin < 10 || isempty(keep)
keep = false;
end
typenames = struct('mse','Mean-Squared Error','mae','Mean Absolute Error',...
'deviance','Binomial Deviance','auc','AUC','class','Misclassification Error');
... |
github | xyza11808/MATLAB-master | unbreakxaxis.m | .m | MATLAB-master/breakxaxis/unbreakxaxis.m | 299 | utf_8 | 27245623b049d3a3f78c2c622c82aeae |
function unbreakxaxis(breakInfo)
delete(breakInfo.leftAxes);
delete(breakInfo.rightAxes);
delete(breakInfo.breakAxes);
delete(breakInfo.annotationAxes);
for i = 1:numel(breakInfo.invisibleObjects)
set(breakInfo.invisibleObjects(i),'Visible','on');
end
end |
github | xyza11808/MATLAB-master | breakxaxis.m | .m | MATLAB-master/breakxaxis/breakxaxis.m | 11,663 | utf_8 | 86d70f4a907a88c29fa10ebfec1b904b |
% breakxaxes splits data in an axes so that data is in a left and right pane.
%
% breakXAxes(splitXLim) splitXLim is a 2 element vector containing a range
% of x values from splitXLim(1) to splitXLim(2) to remove from the axes.
% They must be within the current xLimis of the axes.
%
% breakXAxes(splitXLim,spli... |
github | xyza11808/MATLAB-master | abf2load.m | .m | MATLAB-master/Abf2Tmp-ver0-2-3/abf2load.m | 1,842 | utf_8 | f393cffc963034a1d23036b3cfb7c88b | %
% function abf2load
% this was created for loading abf 2.0 files from axoscope 10
% it uses a windows exe file called Abf2Tmp which creates two output
% files. First the data file .txt and second the metadata file -md.txt.
% Written by Ryan Thompson. bigryan@users.sourceforge.net
function [data, metada... |
github | xyza11808/MATLAB-master | pdftops.m | .m | MATLAB-master/altmany-export_fig-76bd7fa/pdftops.m | 5,378 | utf_8 | d6a8dd5f4835eac6ae64a5e70508336d | function varargout = pdftops(cmd)
%PDFTOPS Calls a local pdftops executable with the input command
%
% Example:
% [status result] = pdftops(cmd)
%
% Attempts to locate a pdftops executable, finally asking the user to
% specify the directory pdftops was installed into. The resulting path is
% stored for future refere... |
github | xyza11808/MATLAB-master | crop_borders.m | .m | MATLAB-master/altmany-export_fig-76bd7fa/crop_borders.m | 4,703 | utf_8 | 918d1b232ba972d5dcfd0784147e6516 | function [A, vA, vB, bb_rel] = crop_borders(A, bcol, padding, crop_amounts)
%CROP_BORDERS Crop the borders of an image or stack of images
%
% [B, vA, vB, bb_rel] = crop_borders(A, bcol, [padding])
%
%IN:
% A - HxWxCxN stack of images.
% bcol - Cx1 background colour vector.
% padding - scalar indicating how much... |
github | xyza11808/MATLAB-master | isolate_axes.m | .m | MATLAB-master/altmany-export_fig-76bd7fa/isolate_axes.m | 4,721 | utf_8 | 253cd7b7d8fc7cb00d0cc55926f32de5 | function fh = isolate_axes(ah, vis)
%ISOLATE_AXES Isolate the specified axes in a figure on their own
%
% Examples:
% fh = isolate_axes(ah)
% fh = isolate_axes(ah, vis)
%
% This function will create a new figure containing the axes/uipanels
% specified, and also their associated legends and colorbars. The objects
%... |
github | xyza11808/MATLAB-master | im2gif.m | .m | MATLAB-master/altmany-export_fig-76bd7fa/im2gif.m | 6,048 | utf_8 | 5a7437140f8d013158a195de1e372737 | %IM2GIF Convert a multiframe image to an animated GIF file
%
% Examples:
% im2gif infile
% im2gif infile outfile
% im2gif(A, outfile)
% im2gif(..., '-nocrop')
% im2gif(..., '-nodither')
% im2gif(..., '-ncolors', n)
% im2gif(..., '-loops', n)
% im2gif(..., '-delay', n)
%
% This function converts a mu... |
github | xyza11808/MATLAB-master | read_write_entire_textfile.m | .m | MATLAB-master/altmany-export_fig-76bd7fa/read_write_entire_textfile.m | 924 | utf_8 | 779e56972f5d9778c40dee98ddbd677e | %READ_WRITE_ENTIRE_TEXTFILE Read or write a whole text file to/from memory
%
% Read or write an entire text file to/from memory, without leaving the
% file open if an error occurs.
%
% Reading:
% fstrm = read_write_entire_textfile(fname)
% Writing:
% read_write_entire_textfile(fname, fstrm)
%
%IN:
% fname - Pathn... |
github | xyza11808/MATLAB-master | pdf2eps.m | .m | MATLAB-master/altmany-export_fig-76bd7fa/pdf2eps.m | 1,471 | utf_8 | a1f41f0c7713c73886a2323e53ed982b | %PDF2EPS Convert a pdf file to eps format using pdftops
%
% Examples:
% pdf2eps source dest
%
% This function converts a pdf file to eps format.
%
% This function requires that you have pdftops, from the Xpdf suite of
% functions, installed on your system. This can be downloaded from:
% http://www.foolabs.com/xpdf ... |
github | xyza11808/MATLAB-master | print2array.m | .m | MATLAB-master/altmany-export_fig-76bd7fa/print2array.m | 9,369 | utf_8 | ca18a1e6c5a944b591a0557bd69f1c2c | function [A, bcol] = print2array(fig, res, renderer, gs_options)
%PRINT2ARRAY Exports a figure to an image array
%
% Examples:
% A = print2array
% A = print2array(figure_handle)
% A = print2array(figure_handle, resolution)
% A = print2array(figure_handle, resolution, renderer)
% A = print2array(figure_handle... |
github | xyza11808/MATLAB-master | append_pdfs.m | .m | MATLAB-master/altmany-export_fig-76bd7fa/append_pdfs.m | 2,678 | utf_8 | 949c7c4ec3f5af6ff23099f17b1dfd79 | %APPEND_PDFS Appends/concatenates multiple PDF files
%
% Example:
% append_pdfs(output, input1, input2, ...)
% append_pdfs(output, input_list{:})
% append_pdfs test.pdf temp1.pdf temp2.pdf
%
% This function appends multiple PDF files to an existing PDF file, or
% concatenates them into a PDF file if the output fi... |
github | xyza11808/MATLAB-master | using_hg2.m | .m | MATLAB-master/altmany-export_fig-76bd7fa/using_hg2.m | 1,064 | utf_8 | a1883d15c4304cd0ac406c117e3047ea | %USING_HG2 Determine if the HG2 graphics engine is used
%
% tf = using_hg2(fig)
%
%IN:
% fig - handle to the figure in question.
%
%OUT:
% tf - boolean indicating whether the HG2 graphics engine is being used
% (true) or not (false).
% 19/06/2015 - Suppress warning in R2015b; cache result for improved per... |
github | xyza11808/MATLAB-master | eps2pdf.m | .m | MATLAB-master/altmany-export_fig-76bd7fa/eps2pdf.m | 8,435 | utf_8 | 95432e4216ee24df69e7e5720c6c4039 | function eps2pdf(source, dest, crop, append, gray, quality, gs_options)
%EPS2PDF Convert an eps file to pdf format using ghostscript
%
% Examples:
% eps2pdf source dest
% eps2pdf(source, dest, crop)
% eps2pdf(source, dest, crop, append)
% eps2pdf(source, dest, crop, append, gray)
% eps2pdf(source, dest, crop... |
github | xyza11808/MATLAB-master | ghostscript.m | .m | MATLAB-master/altmany-export_fig-76bd7fa/ghostscript.m | 7,706 | utf_8 | 92dbafb8d4fb243cae8716c6ecb0bbe5 | function varargout = ghostscript(cmd)
%GHOSTSCRIPT Calls a local GhostScript executable with the input command
%
% Example:
% [status result] = ghostscript(cmd)
%
% Attempts to locate a ghostscript executable, finally asking the user to
% specify the directory ghostcript was installed into. The resulting path
% is s... |
github | xyza11808/MATLAB-master | fix_lines.m | .m | MATLAB-master/altmany-export_fig-76bd7fa/fix_lines.m | 6,290 | utf_8 | 8437006b104957762090e3d875688cb6 | %FIX_LINES Improves the line style of eps files generated by print
%
% Examples:
% fix_lines fname
% fix_lines fname fname2
% fstrm_out = fixlines(fstrm_in)
%
% This function improves the style of lines in eps files generated by
% MATLAB's print function, making them more similar to those seen on
% screen. Grid ... |
github | xyza11808/MATLAB-master | pam.m | .m | MATLAB-master/clusterEstimate/pam.m | 8,067 | utf_8 | 430b4d070b81a6b9f8c9f3f6317e07f9 | function result = pam(x,kclus,vtype,stdize,metric,silhplot)
%PAM returns a list representing a clustering of the data into kclus
%clusters following the pam algorithm which is based on the search
%for kclus representative objects or medoids among the observations of
%the dataset
%
%The algorithm is fully described in:... |
github | xyza11808/MATLAB-master | valid_RandIndex.m | .m | MATLAB-master/clusterEstimate/valid_RandIndex.m | 1,663 | utf_8 | b9810e2a318804e8e0427446d19124d8 | function [AR,RI,MI,HI]=RandIndex(c1,c2)
%RANDINDEX - calculates Rand Indices to compare two partitions
% ARI=RANDINDEX(c1,c2), where c1,c2 are vectors listing the
% class membership, returns the "Hubert & Arabie adjusted Rand index".
% [AR,RI,MI,HI]=RANDINDEX(c1,c2) returns the adjusted Rand index,
% the unadjusted R... |
github | xyza11808/MATLAB-master | dpca_marginalize.m | .m | MATLAB-master/dpca/dpca_marginalize.m | 8,760 | utf_8 | 49e696c1ebdc670287f1522a9d123680 | function [YY, margNums] = dpca_marginalize(X, varargin)
% YY = dpca_marginalize(X) computes data marginalized over all combinations
% of parameters. X is a multi-dimensional array of dimensionality D+1, where
% first dimension corresponds to neurons and the rest D dimensions --
% to various parameters. YY is a cell ar... |
github | xyza11808/MATLAB-master | beads.m | .m | MATLAB-master/BEADS_toolbox/beads.m | 3,088 | utf_8 | 2ecbeee69ce9ceecda08ec203f5f56ab | function [x, f, cost] = beads(y, d, fc, r, lam0, lam1, lam2)
% [x, f, cost] = beads(y, d, fc, r, lam0, lam1, lam2)
%
% Baseline estimation and denoising using sparsity (BEADS)
%
% INPUT
% y: Noisy observation
% d: Filter order (d = 1 or 2)
% fc: Filter cut-off frequency (cycles/sample) (0 < fc < 0.5)
% r: Asym... |
github | xyza11808/MATLAB-master | run_CNMF_patches.m | .m | MATLAB-master/CaImAn-MATLAB-master/run_CNMF_patches.m | 12,801 | utf_8 | 692daac187123e553f0d7d0ea93e9573 | function [A,b,C,f,S,P,RESULTS,YrA] = run_CNMF_patches(data,K,patches,tau,p,options)
% RUN_CNMF_PATCHES - apply CNMF algorithm on overlapping patches in parallel
%
% [A,b,C,f,S,P,RESULTS,YrA] = run_CNMF_patches(data,K,patches,tau,p,options)
%
% Run the constrained NMF algorithm on a large dataset by operating on
% spa... |
github | xyza11808/MATLAB-master | Initialization.m | .m | MATLAB-master/CaImAn-MATLAB-master/Initialization.m | 9,141 | utf_8 | fb328bf84b572a7e3e56f1f94546053b | function varargout = Initialization(varargin)
%INITIALIZATION MATLAB code file for Initialization.fig
% INITIALIZATION, by itself, creates a new INITIALIZATION or raises the existing
% singleton*.
%
% H = INITIALIZATION returns the handle to a new INITIALIZATION or the handle to
% the existing singl... |
github | xyza11808/MATLAB-master | plotCenteroverY.m | .m | MATLAB-master/CaImAn-MATLAB-master/3D/plotCenteroverY.m | 2,381 | utf_8 | a239bb9a1e1524e0f9dddb605e45b2e7 | function figH = plotCenteroverY(Y, icenter, sizY, params)
% plotCenteroverY(Y, icenter, sizY, params)
% Displays center or roi's over a XY, YZ and XZ projections of Y.
% inputs:
% Y : background image 2D or 3D matrix (spatial dimensions are 2D or 3D)
% icenter: center or rois kxm (k == number of rois, m == spatial dime... |
github | xyza11808/MATLAB-master | plot4Dproj.m | .m | MATLAB-master/CaImAn-MATLAB-master/3D/plot4Dproj.m | 3,324 | utf_8 | 53b425bfbfb0e05ca0e2dfb58f18fdb0 | function figH = plot4Dproj(Y, maskY, sizY, params)
% plot4Dproj(Y, maskY, sizY, params)
% Displays XY, YZ and XZ projections of Y over time.
% inputs:
% Y : 3D or 4D matrix (2DxT, 3D, 3DxT)
% maskY: mask to overlay on Y (as a contour, for values greater then 0)
% sizY: spatial dimensions of Y (2D or 3D);
% params: extr... |
github | xyza11808/MATLAB-master | compute_event_exceptionality.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/compute_event_exceptionality.m | 3,841 | utf_8 | f413785d5509df1394473b9c6c85db47 | function [fitness,erfc,sd_r,md] = compute_event_exceptionality(traces,N,robust_std)
%{
Define a metric and order components according to the probabilty if some "exceptional events" (like a spike).
Suvh probability is defined as the likeihood of observing the actual trace value over N samples given an estimated ... |
github | xyza11808/MATLAB-master | lars_regression_noise.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/lars_regression_noise.m | 7,334 | utf_8 | bed898facc9efbb71ede681d8886bfb4 | function [Ws, lambdas, W_lam, lam, flag] = lars_regression_noise(Y, X, positive, noise)
% run LARS for regression problems with LASSO penalty, with optional positivity constraints
% Author: Eftychios Pnevmatikakis. Adapted code from Ari Pakman
% Input Parameters:
% Y: Y(:,t) is the observed data at time ... |
github | xyza11808/MATLAB-master | kde.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/kde.m | 7,076 | utf_8 | 3a33931f2a89111a29b1562146eb9249 | function [bandwidth,density,xmesh,cdf]=kde(data,n,MIN,MAX)
% Reliable and extremely fast kernel density estimator for one-dimensional data;
% Gaussian kernel is assumed and the bandwidth is chosen automatically;
% Unlike many other implementations, this one is immune to problems
% caused by multimo... |
github | xyza11808/MATLAB-master | plot_components_GUI.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/plot_components_GUI.m | 6,220 | utf_8 | afa16c2fcf3bd8c70df0dd6284ada921 | %%
function plot_components_GUI(Y,A,C,b,f,Cn,options)
memmaped = isobject(Y);
defoptions = CNMFSetParms;
if nargin < 7 || isempty(options); options = []; end
if ~isfield(options,'d1') || isempty(options.d1); d1 = input('What is the total number of rows? \n'); else d1 = options.d1; end % # of rows
if ~isfield(... |
github | xyza11808/MATLAB-master | fast_nmf.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/fast_nmf.m | 1,283 | utf_8 | 80b271fe55006b0d831f13d4a706e842 | function [W,H] = fast_nmf(A,B,k,max_iter)
% fast NMF computation of a matrix decomponsed in A*B form
if nargin < 4 || isempty(max_iter)
max_iter = 20;
end
[W,H] = nnsvd(A,B,k);
H = H';
for iter = 1:max_iter
W = max((A*(B*H'))/(H*H'),0);
H = max((W'*W)\((W'*A)*B),0);
%disp(iter)
end
function [W,H] =... |
github | xyza11808/MATLAB-master | greedyROI.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/greedyROI.m | 13,490 | utf_8 | e327370bbbd52fa899d5299ffdb1eb28 | function [Ain, Cin, b_in, f_in, center, res] = greedyROI(Y, K, params, ROI_list)
% component initialization using a greedy algorithm to identify neurons in 2d or 3d calcium imaging movies
%
% Usage: [Ain, Cin, bin, fin, center, res] = greedyROI2d(data, K, params)
%
% Input:
% Y d1 x d2 x (d3 x) T movie, ra... |
github | xyza11808/MATLAB-master | ROI_GUI.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/ROI_GUI.m | 46,232 | utf_8 | 111d7ced7b2692efe1aeedfd0cbe9225 | function varargout = ROI_GUI(varargin)
% ROI_GUI MATLAB code for ROI_GUI.template_fig
% ROI_GUI, by itself, creates a new ROI_GUI or raises the existing
% singleton*.
%
% H = ROI_GUI returns the handle to a new ROI_GUI or the handle to
% the existing singleton*.
%
% ROI_GUI('CALLBACK',hObject,e... |
github | xyza11808/MATLAB-master | Hungarian.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/Hungarian.m | 9,049 | utf_8 | bf5c068d26692aa6387bb69df9b6f852 | function [Matching,Cost] = Hungarian(Perf)
%
% [MATCHING,COST] = Hungarian_New(WEIGHTS)
%
% A function for finding a minimum edge weight matching given a MxN Edge
% weight matrix WEIGHTS using the Hungarian Algorithm.
%
% An edge weight of Inf indicates that the pair of vertices given by its
% position have no adjacen... |
github | xyza11808/MATLAB-master | greedyROI_corr.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/greedyROI_corr.m | 9,164 | utf_8 | 68e5dd066fdc3ec9cc323201a84edfa6 | function [Ain, Cin, bin, fin, center, res] = greedyROI_corr(Y, K, options, sn, debug_on, save_avi)
%% a greedy method for detecting ROIs and initializing CNMF. in each iteration,
% it searches the one with large (peak-median)/noise level and large local
% correlation
%% Input:
% Y: d X T matrx, imaging data
% K: ... |
github | xyza11808/MATLAB-master | subdir.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/subdir.m | 3,733 | utf_8 | 00ecbfe501a10bbea84b9fbaaaaf5f8e | function varargout = subdir(varargin)
%SUBDIR Performs a recursive file search
%
% subdir
% subdir(name)
% files = subdir(...)
%
% This function performs a recursive file search. The input and output
% format is identical to the dir function.
%
% Input variables:
%
% name: pathname or filename for search, can be a... |
github | xyza11808/MATLAB-master | signalExtraction.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/signalExtraction.m | 3,642 | utf_8 | a7fb1981bbffe9d3ffc5168d7f17f7ad | function [ inferred, filtered, raw ] = signalExtraction(Y,A,C,b,f,d1,d2,extractControl)
% this code extract the signal after CNMF is ran
% inputs: Y raw data (d X T matrix, d # number of pixels, T # of timesteps)
% A matrix of spatial components (d x K matrix, K # of components)
% C matrix of temporal... |
github | xyza11808/MATLAB-master | untitled.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/GUI/untitled.m | 7,165 | utf_8 | f5aa9799b1cd508f968ed82a909710e0 | function varargout = untitled(varargin)
% UNTITLED MATLAB code for untitled.fig
% UNTITLED, by itself, creates a new UNTITLED or raises the existing
% singleton*.
%
% H = UNTITLED returns the handle to a new UNTITLED or the handle to
% the existing singleton*.
%
% UNTITLED('CALLBACK',hObject,ev... |
github | xyza11808/MATLAB-master | Initialization.m | .m | MATLAB-master/CaImAn-MATLAB-master/utilities/GUI/Initialization.m | 9,191 | utf_8 | 3c773feb406a8f8edc97eab3937a0355 | function varargout = Initialization(varargin)
% INITIALIZATION MATLAB code for Initialization.fig
% INITIALIZATION, by itself, creates a new INITIALIZATION or raises the existing
% singleton*.
%
% H = INITIALIZATION returns the handle to a new INITIALIZATION or the handle to
% the existing singleton... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.