I often export data from Matlab into TSV files for students and collaborators to use in other programs. It is not entirely straightforward to open these files in MS Excel, so here is a series of screenshots of how to do it. There are two tricks to make it work:
- Remember to use “tab” as the delimiter between columns
- On Norwegian and other systems that use “comma” as decimal separator, it is necessary to specify that the TSV file contains values with “dot” as the decimal separator.
I am working on some plots in Matlab, where I am using the filename as the title of the plot. In many of the files I am using underscores (_) as separator, and the result is that Matlab creates a subscript.
So for a file called b_staccato_004, I get a title bstaccato004.
After some googling I found that this is because Matlab per default treats such text strings as LaTeX code. The solution is to use the interpreter message locally:
title(filename, 'interpreter', 'none')
or it can be set globally using:
set(0, 'DefaulttextInterpreter', 'none')
I am using the excellent MIRToolbox for Matlab for a lot of sound analysis applications these days. It meets a lot of my needs, but there are a few things that I miss. Perhaps the most important one is the ability to make clean greyscale spectrograms. The regular mirspectrum function returns a colour spectrogram with lots of garnish, like this:
Such a spectrogram may be useful in some contexts, but not always. Often I just want a plain, greyscale spectrogram, like this:
Here is my trick to do this, based on mirspectrum:
as=mirspectrum(a, 'Frame', 'Max', 3000);
lgrays(i,:) = 1-i/100;
Let me know if you have a better solution for doing this.