Hi! Welcome...

One day there will be something interesting here. Today is not that day, but at least there is a bit more than there used to be...

1 January 2010 View Comments

Basic Sound Processing with python

This page describes how to perform some basic sound processing functions in python. We’ll be using the pylab interface, which gives access to numpy and matplotlib, both these packages need to be installed. We’ll also use the Audiolab package (formerly Pyaudiolab) to import wav files. Download and installation instructions are given on the author’s page.
We’ll [...]

1 January 2010 View Comments

Special Web blog (WordPress) for Personal Use

In case you have some family blog or its content is a little too private, I’ve been looking for a way to redirect anybody who wants to view the blog to a login page. I found an "Authenticator" plugin (link- its in german). Its good to make a little change to the plug-in though, around [...]

1 January 2010 View Comments

Backup an entire hard disk using dd command

The ‘ dd ‘ command is one of the original Unix utilities and should be in everyone’s tool box. It can strip headers, extract parts of binary files and write into the middle of floppy disks; it is used by the Linux kernel Makefiles to make boot images. It can be used to copy and [...]

31 December 2009 View Comments

Matlab Quick Reference: Plot

Matlab figure title with two lines
 

clc
plot(1:10)
title({’Comparison of Results’;'using Mean Squared Error (MSE)’})
set(gca, ‘Units’, ‘Normalized’)
P=get(gca,’Position’);
% Shrink the bottom margin by half its height and
% enlarge the top margin by the same amount
% (since the axis is the same height before & after)
set(gca, ‘Position’, [P(1) P(2)/2 P(3) P(4)])
disp(’This is how it looks after moving the axis’)

 
Double axis [...]

31 December 2009 View Comments

Matlab Quick Reference: Input/Ouput

I/O
Extract date from file

s = dir(’junk.m’);
s.date
Open a formatted text file

fid = fopen(’file.dat’,'w’)
w: write r: read a: append returns -1 if error
If the file is a text file and you want to write to it, consider using ‘t’ as an attribute if you want Windows line break example:
fid = fopen(’file.txt’, ‘wt’)

Close file

fclose(fid)
fclose(’all’) % closes all open [...]

31 December 2009 View Comments

Matlab Quick Reference: Functions

Functions
Syntax

function y = average(x)
% AVERAGE Mean of vector elements.
% only first comment line is printed when you type “lookfor average”
% the other lines print when you type “help average”
y = sum(x)/length(x); % Actual computation
function [Xout,Yout] = myFunc(x)
Number Of Arguments
nargin: number of input arguments nargout: number of output arguments
Number of Input Arguments
function testvar(x1, x2, varargin)
Varargin [...]

31 December 2009 View Comments

Matlab Quick Reference: General

My Matlab quick reference: General notes

30 December 2009 View Comments

Faster Matlab Calculation: Use Preallocation

Preallocation
I am a believer in preallocation.  For a particular application, I read in about 13GB of data from a file into a 4-D matrix (this was running on a machine with 32GB of memory).  Before preallocation, I let the process run for about 10 hours, and it still hadn’t finished.  With preallocation the process finished [...]