teaching machines

Plotting samples with GNU Octave

December 16, 2011 by . Filed under fish vision, public.

Suppose we have a plain text file of samples named samples.txt, with each intensity on its own line:

1
2
3
4
5
4
3
2
1
0
-1
2
3
4
5
4
3
2
1
0
1
2
3
4

We can visualize these results in GNU Octave with:

samples = load('-ascii', 'samples.txt');
plot(samples);

If we write this code in a script named plot_samples.m, we can simply run plot_samples at the Octave command-line.