Building QtOctave 0.8.2 from source

The current version of qtoctave provided by apt-get is 0.8.1. I experience some problems that freeze my qteditor. So I check for a bug and found that there is a newer version, which can have some bug fixes. However, when installing QtOctave I have to turnaround the following issues presented in the QtOctave blog:

1. Include in files below:

sed '1 i #include \' qtoctave_pkg/src/main.cpp
sed '1 i #include \' qtoctave/src/search_dialog.cpp.

2. Change the order of the CMakefileList.txt to:

TARGET_LINK_LIBRARIES(qtjs
${QT_QTUITOOLS_LIBRARY}
${Qt4_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
#${QT_QTSVG_LIBRARY}
${QT_QTSCRIPT_LIBRARY}

rather than

TARGET_LINK_LIBRARIES(qtjs
${Qt4_LIBRARIES}
${QT_QTCORE_LIBRARY}
${QT_QTGUI_LIBRARY}
${QT_QTXML_LIBRARY}
#${QT_QTSVG_LIBRARY}
${QT_QTUITOOLS_LIBRARY}
${QT_QTSCRIPT_LIBRARY}

3. Compile cmake in the current directory instead of create a directory build to insteas as is described in readme.

qtoctave-0.8.2$ cmake .
qtoctave-0.8.2$ make
qtoctave-0.8.2$ make install

See ya

[Bug Fix] Octave doesn’t print markers jointly with errorbar

I couldn’t plot two curves with confidence interval using errorbar in Octave 3.2. When I include errorbar it mess the markers. I found that it is really a bug. Jarno Rajahalme publish a fix to it on Nabble (which works for me):

%% HACK FIX 2/22/2010 Jarno Rajahalme 
%% Apparently the "line" with markers and errorbars needs to be added AFTER 
%% the normal line, for the legend to have the markers present 
%% See also below 
[+]    hll = __line__ (hg); 


%% HACK FIX 2/22/2010 Jarno Rajahalme 
%% Apparently the "line" with markers and errorbars needs to be added AFTER 
%% the normal line, for the legend to have the markers present 
%% This line added ABOVE, only set the properties here 
%% NOTE: if "parent" property is set, the legend will be again drawn without markers! 
%% 

[-]    __line__ (hg, "xdata", get (hl, "xdata"), 
[-]	      "ydata", get (hl, "ydata"), 
[-]	      "color", get (hl, "color"), 
[-]	      "linewidth", get (hl, "linewidth"), 
[-]	      "linestyle", get (hl, "linestyle"), 
[-]	      "marker", "none", "parent", hg); 

[+] set (hll, "xdata", get (hl, "xdata")); 
[+] set (hll, "ydata", get (hl, "ydata")); 
[+] set (hll, "color", get (hl, "color")); 
[+] set (hll, "linewidth", get (hl, "linewidth")); 
[+] set (hll, "linestyle", get (hl, "linestyle")); 
[+] set (hll, "marker", "none"); 
[+] %set (hll, "parent", hg); 

See ya

QtOctave: a front-end to GNU Octave with easyplot

After testing some front end tools to octave (Xoctave, octaveNB on netbeans) I found QtOctave wich seems nice. It provides a script editor with syntax coloring and press F5 to run on a console (that you can put side by side with the editor). Seems better than works on console. You can install it using apt-get tools:

sudo apt-get install qtoctave

After install it, you should set the octave path on Config/General Configurations/Octave path. If you want you can install easyplot, a tool that provide some basic customizations after plotting a figure: such as set title, labels, fonts. To install easyplot requires installing some qt packages and compiling from source:

sudo apt-get install qt4-qmake qt3-dev-tools 
wget http://forja.rediris.es/frs/download.php/511/easy_plot-1.1.tar.gz
tar -xzf easy_plot-1.1.tar.gz
cd easy_plot
cmake .
make
make install 
# it was necessary include cstdio library on file gnuplot_connection.cpp 
sed '1 i #include ' src/gnuplot_connection.spp

Follows some previews:

See ya

Arquivo de áudio no Octave

Octave quem ?

Octave é um programa para cálculos matemáticos, assim como o Matlab, mas está sob licença GPL. Se você está no Linux e precisa de algo como o Matlab comece instalando o Octave: “apt-get install octave”, ou “yum …” , etc.

No console, solte o comando “octave”. Vamos usar um arquivo .wav como entrada, o barulho da grana entrando, vou supor que foi baixado em “/home/seunomedeusuario/”  Agora o comando “[x fs bits] = wavread(‘/home/seunomedeusuario/cashtill.wav’)”. Agora vamos plotar o resultado com “plot(x)” e voilà. Uma coisa interessante é usar uma função muito utilizada no processamento de sinais sobre este resultado, a Transformada Rápida de Fourier: “plot(fft(x))” e  plot(abs(fft(x))).