Rank: 869 based on 123 downloads (last 30 days) and 10 files submitted
photo

Peter O'Connor

E-mail
Company/University
McGill

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Files Posted by Peter View all
Updated   File Tags Downloads
(last 30 days)
Comments Rating
14 May 2012 Screenshot Siegert Neuron The Siegert Neuron has a transfer function equivalent to a leaky integrate-and-fire neuron. Author: Peter O'Connor siegert, integrate and fire, spiking neurons, neural networks 7 0
02 May 2012 sig method signatures for OOP Author: Peter O'Connor oop, object, autocomplete, class, signature 16 0
02 May 2012 peakperformance Find local peaks in a signal Author: Peter O'Connor findpeaks, peak detection, local maxima 11 0
18 Apr 2011 TakeAPicture Take a snapshot of the current figure, save it as a png (or tiff or whatever) image Author: Peter O'Connor data export, gui, snapshot, screenshot, image, png 9 0
08 Mar 2011 Data Acquisition Thing DataQ device device interface for when the provided package doesn't work Author: Peter O'Connor data acquisition, dataq, daq, analog 11 0
Comments and Ratings by Peter View all
Updated File Comments Rating
11 Jun 2012 mpgwrite The MPEG converter takes a MATLAB movie matrix and writes the movie to disk as an MPEG file. Author: David Foti

Great function.

Problem:In Linux crashes matlab after writing the file.

Solution: As Dan Russ said (above), the way to fix this is go into the mpeg.c file in src and comment out the line: "fclose(ofp);" in GenMPEGStream

08 May 2012 Running Extrema Returns the running minimum or maximum of a vector or matrix (analagous to the running average) Author: Dan K

where have you been all my life?

01 Jun 2011 Vuvuzela sound denoising algorithm This script implements a sound denoising algorithm in Matlab for vuvuzela sound cancelation. Author: Choqueuse Vincent

If you take the time to turn this nasty script into a respectable function, it actually works pretty nicely. very useful

26 Jan 2011 quickfind Quickly finds an element in a sorted list. If not found, returns -index of next smaller element. Author: Peter O'Connor

There's probably a faster search function implemented in mex out there, I didn't look very hard.

It just does a generalized version of binary search, where it spits into 100 intervals instead of 2 on each iteration. Reason being that each time a while loop iterates in matlab it has to go through all the overhead of the interpretor, so it's to a certain extent better to reduce iterations and do small linear searches in each.

The advantage over histc is just really when you need to search big lists of like a billion elements repeatedly. histc has the overhead of first checking to see if the list is sorted. This function trusts you to be a grown-up and sort your own lists.

02 Dec 2009 Vorbis ogg audio encoding/decoding ogg audio encoding/decoding Author: Alfredo Fernandez

I was also getting a "Error while decodong file. File may be corrupted", but the quotes thing wasn't the issue. I just commented out the error message on line 66 and now it works like a charm.

Comments and Ratings on Peter's Files View all
Updated File Comment by Comments Rating
19 Jan 2012 PeakSeek Find peaks in vector Author: Peter O'Connor Kaliakmanis, Dimitris

has same problem as findpeaks...It can't detect peaks that exist at edges of vectors. Such a vector for example is [10 9 8 7 6 5] and the only peak it has is it's first value 10,but neither peakseek nor findpeaks can't detect it

14 Jun 2011 PeakSeek Find peaks in vector Author: Peter O'Connor Delaney, Kevin J.

Nice work!

26 Jan 2011 quickfind Quickly finds an element in a sorted list. If not found, returns -index of next smaller element. Author: Peter O'Connor O'Connor, Peter

There's probably a faster search function implemented in mex out there, I didn't look very hard.

It just does a generalized version of binary search, where it spits into 100 intervals instead of 2 on each iteration. Reason being that each time a while loop iterates in matlab it has to go through all the overhead of the interpretor, so it's to a certain extent better to reduce iterations and do small linear searches in each.

The advantage over histc is just really when you need to search big lists of like a billion elements repeatedly. histc has the overhead of first checking to see if the list is sorted. This function trusts you to be a grown-up and sort your own lists.

21 Jan 2011 quickfind Quickly finds an element in a sorted list. If not found, returns -index of next smaller element. Author: Peter O'Connor Gary

I'm confused by this. If the list is sorted, why wouldn't you use a binary search? For my simple test, a FEX binary search is considerably faster than this. I'm not meaning to be critical - just wondering what problem this addresses that a binary search doesn't.
A=1:10000;
tic
for indx=1:10000
loc=quickfind(indx,A);
end
quickfindTime=toc

20 Jan 2011 quickfind Quickly finds an element in a sorted list. If not found, returns -index of next smaller element. Author: Peter O'Connor Luong, Bruno

QUICKFIND might have a slight speed avantage, but surely not as flexible as MATLAB HISTC:

[~, loc] = histc(el,list)

Contact us