Matlab tricks
Matlab functions
Matlab errorbar graphs
Doing errorbar graphs in Matlab is a bit of a nuisance.
- myeb.m draws nice
shaded, coloured errorbar regions like this:
- barweb.mis a bit of code that will produce grouped bar plots with errorbars -- again an annoying thing matlab can't do by default. My slightly slimmed-down version of this is mybarweb.m
Assign fields of a structure to variables with name of field
mydeal.m deals all fields of a structure to variables with the same name as the structure. Supereasy, but took me ages to find out how to do it...
Rotate labels
Matlab graphics
A good overview over some strange things matlab can do is here.
Matlab 7 on ubuntu
The installation went perfectly fine, but I did get an error saying:
/opt/matlab7/bin/util/oscheck.sh: line 134: /lib/libc.so.6: Permission denied
when starting up matlab. I googled and found this and this page which told me to do the following:
Find out what libstcd++ you have. It should be in /usr/local/, and then just do
sudo ln -s /usr/lib/libstdc++.so.6.0.5 /usr/lib/libstdc++.sowhere you replace the 6.0.5 with whatever you have.
Psignifit toolbox on ubuntu
While in Tübingen, I got shown the great psignifit toolbox, which fits psychometric curves,
does bootstrap estimates of confidence intervals and lots of nice things. To get it to work on my ubuntu machine with matlab (there is also a standalone
version), I tried to simply recompile it by typing makepsig before having corrected the bug above but that wouldn't work -- I got an
error saying
>> makepsig
However, after correcting the bug above, makepsig worked sweetly and fine.
PSIGNIFIT toolbox directory is /home/qhuys/matlab/addons/psignifit
/usr/bin/ld: cannot find -lstdc++
collect2: ld returned 1 exit status
mex: link of '/home/qhuys/matlab/addons/psignifit/psignifit.mexglx' failed.
??? Error using ==> makepsig
Error using ==> mex
Unable to complete successfully
'