Introduction About Site Map

XML
RSS 2 Feed RSS 2 Feed
Navigation

Main Page | Blog Index

Monday, December 6th, 2010, 1:09 am

3-D Fun with GNU Octave

I HAD worries that GNU Octave would not support some of the advanced graphing functionality of MATLAB, but with the help of tools like gnuplot, Octave stays on par in this game (bar some OpenGL enhancements). Much to my surprise, the 3-D charting and graphing software in GNU Octave. Here are some visualisations of cardiac images I work with.

Heart surface

Heart landmarks - mesh overlay

Surface - large

Monday, December 6th, 2010, 12:51 am

Wikileaks Opens Governments and Microsoft Falsely Says It’s Open

TechBytes

Direct download as Ogg (1:46:36, 40.1 MB) | Direct download as MP3 (48.4 MB)

Summary: Another ordinary episode with a lot of interesting topics and news

TODAY’S show is a mixed bag of GNU/Linux, antiquated law, computer games, and Microsoft pretending to be “open”. OpenBytes will publish the show notes very soon. We suffered from unusual connection difficulties which sometimes made the audio a little poor in terms of quality, but overall it should be easy to understand throughout.

RSS 64x64Today’s show ends with “Rock n’ Roll Hall of Fame”. We hope you will join us for future shows and consider subscribing to the show via the RSS feed. You can also visit our archives for past shows. If you have an Identi.ca account, consider subscribing to TechBytes in order to keep up to date.

As embedded (HTML5):

Download:

Ogg Theora
(There is also an MP3 version)

Sunday, December 5th, 2010, 8:43 pm

Supporting Wikileaks

Roy Schestowitz as baby

Manning

TODAY I decided to step up with my support of Wikileaks, which I perceive as a test case for free speech and Internet freedom regardless or irrespective of the impact of what they are doing. Therefore I changed my usual avatar in Twitter and Identi.ca to a modified version of a banner calling for the release of Manning, the leaker who is the real hero in this case (Assange is the messenger/publisher).

Saturday, December 4th, 2010, 12:58 am

TechBytes Episode 16 Covers MVPs, Wikileaks, and GNU/Linux

TechBytes

Direct download as Ogg (1:18:53, 24.1 MB) | Direct download as MP3 (36.1 MB)

Summary: Issues of the day are debated and treated as something gentle to end a Wikileaks-filled news week with

TODAY’S show is the first show of this month. Rather than cover a lot of news we picked topics which we selected in advance all of for us to cover without preparation. This show is shorter than usual because it was recorded around midnight and OpenBytes will publish the show notes very soon.

RSS 64x64Today’s show ends with Tom Smith’s usual track. We hope you will join us for future shows and consider subscribing to the show via the RSS feed. You can also visit our archives for past shows. If you have an Identi.ca account, consider subscribing to TechBytes in order to keep up to date.

As embedded (HTML5):

Download:

Ogg Theora
(There is also an MP3 version)

Thursday, December 2nd, 2010, 7:20 am

GNU Octave – Very Polished, Few Minor Pet Peeves

Fiesta - cardiac

EVERY program has areas worth improving. GNU Octave is no exception and I’ve been trying to submit bug reports (via Savannah) only to find that it has just been compromised (therefore temporarily down), so in the mean time, here is the gist of issues that I found so far.

While Octave is proving to be perfectly compatible with all the basic functions in MATLAB it also proves to be ‘compatible’ with MATLAB’s weight problem. Octave’s core is generally light and much faster to start than MATLAB’s, but when it opens child windows (e.g. ImageMagick), then it suffers a limitation due to the maximum number of allowed windows. For some reason, resources appear not to be recovered when images are closed (it may be leaking memory too), so X.org limits are sooner or later reached. This is a bizarre issue that’s hard to reproduce (in Fedora I cannot even open such windows [1, 2, 3]). But anyway, that’s mostly a performance issue. Closing an Octave session also helps as once it’s restarted windows are numbered from 1 upwards once again.

When it comes to vertical listing of files the UNIX way, there is something a little unexpected in Octave’s implementation of it (which may or may not be compatible with other software). The “ls” function, unless it gets invoked with specific options, will pick its data horizontally rather than vertically from standard I/O in the system call. To illustrate this point consider the following:

>>> ls('*.bmp')
MR000192.bmp  MR000200.bmp  MR000208.bmp  MR000216.bmp	MR000224.bmp
MR000193.bmp  MR000201.bmp  MR000209.bmp  MR000217.bmp	MR000225.bmp
MR000194.bmp  MR000202.bmp  MR000210.bmp  MR000218.bmp	MR000226.bmp
MR000195.bmp  MR000203.bmp  MR000211.bmp  MR000219.bmp	MR000227.bmp
MR000196.bmp  MR000204.bmp  MR000212.bmp  MR000220.bmp
MR000197.bmp  MR000205.bmp  MR000213.bmp  MR000221.bmp
MR000198.bmp  MR000206.bmp  MR000214.bmp  MR000222.bmp
MR000199.bmp  MR000207.bmp  MR000215.bmp  MR000223.bmp
>>> a=ls('*.bmp')
a =

MR000192.bmp
MR000200.bmp
MR000208.bmp
MR000216.bmp
MR000224.bmp
MR000193.bmp
MR000201.bmp
MR000209.bmp
MR000217.bmp
MR000225.bmp
MR000194.bmp
MR000202.bmp
MR000210.bmp
MR000218.bmp
MR000226.bmp
MR000195.bmp
MR000203.bmp
MR000211.bmp
MR000219.bmp
MR000227.bmp
MR000196.bmp
MR000204.bmp
MR000212.bmp
MR000220.bmp
MR000197.bmp
MR000205.bmp
MR000213.bmp
MR000221.bmp
MR000198.bmp
MR000206.bmp
MR000214.bmp
MR000222.bmp
MR000199.bmp
MR000207.bmp
MR000215.bmp
MR000223.bmp

The arrangement is supposed to be on a column-by-column basis (the real ordering), but in the case of an assignment the data gets flattened in a way which does not preserve the original file ordering (alpha-numeric in this case).

By all means move from MATLAB to GNU Octave because these issues are not critical and some may be matters of convenience rather than practicality. If anything, this proves that Octave has only minor creases and no major deficiencies. That’s all I could find after heavy usage.

Wednesday, December 1st, 2010, 7:40 am

Latest TechBytes Episode Covers Google’s GNU/Linux Distribution

TechBytes

Direct download as Ogg (1:15:32, 22.1 MB) | Direct download as MP3 (34.6 MB)

Summary: A mixture of news items with typical focus on operating systems and matters of transparency or scarcity

TODAY’S show in the 15th show in a month of 30 days. Rather than cover a special topic we cover a variety of news stories and have a debate about them. OpenBytes will publish our show notes soon.

RSS 64x64Today’s show ends with Tom Smith’s usual track. We hope you will join us for future shows and consider subscribing to the show via the RSS feed. You can also visit our archives which we plan to improve very soon as we register a domain name for the show and redo some graphics/intro. If you have an Identi.ca account, consider subscribing to TechBytes in order to keep up to date.

As embedded (HTML5):

Download:

Ogg Theora
(There is also an MP3 version)

Tuesday, November 30th, 2010, 12:27 pm

Migrations From MATLAB to GNU Octave

Octave packages

THIS MORNING I spent some time helping others make the same migration which happily enough I made over a month ago (so far, so good!). It’s a migration from proprietary software (and BSA backer) to free-as-in-freedom software, which also happens to be a GNU project. It helps that the project is cross-platform because unlike myself and many others, there are still a lot more Windows users out there. Moving them to Free software on Windows is an essential step which removes barriers when they swap the whole platform. GNU works better on GNU/Linux than on Windows, for obvious reasons. Although it’s a matter of opinion, under KDE QtOctave looks better than MATLAB, as well.

Installing GNU Octave in GNU/Linux is very simple because it is packaged in the repositories of *buntu and Fedora. These are the two distributions where I have checked to verify this although I encountered bumps along the way in Fedora [1, 2, 3]. It is not entirely Fedora’s fault and it’s a known issue that affects many people who are Octave users.

The packages one need to fetch via yum/apt-get (or graphical front ends like Synaptic and KPackageKit) are “Octave” and “QtOctave”. They are not large packages and they should be able to fetch dependencies that are being determined and resolved by the packager/packaging process. Once these are installed, an icon will typically show up somewhere along/inside the menus. If not, run qtoctave from the command line and ensure it gets access to the octave executable (it usually works perfectly ‘out of the box’ based on my experience on multiple boxes). Yes, this should work by default without user intervention, but in case it does not, ensure octave is properly installed and put in the path.

I am unfortunate enough to have faced Windows for about half an hour just now (not my computer) because in some cases, for collaboration purposes, computers that run Windows also need to have Octave installed on them, along with QtOctave for improved ease of use. The way to get that installed is a lot more complex and time consuming because Windows does not have packages managers (this is one of the areas where GNU/Linux is ahead of its competition). In any case, here is how one should install everything and get it set up

Navigate to the downloads page of Octave. At the time of writing (and this may change in the future) there is a native build for Windows, which seems to work without any issues in Windows XP and probably predecessors too. Scroll down to part which says: “The Octave Forge project hosts a native Windows binary distribution of Octave built with the MinGW compiler.”

This leads to Octave-Forge. Near the top of the page there is a “Windows installer (Octave and Octave-Forge)” listed. Now, download the file which is an executable (.exe) and run that. Follow the simple process of installation until completion and at the end ensure that Octave is installed and then listed among the programs in the Windows “Start” (now just Windows logo) menu. The main program is just called “Octave”. When it’s executed it offers a command line prompt which is the Octave interpreter. If everything works fine at this stage, then Octave runs properly and it is time to install the graphical wrapper, QtOctave.

Qt is a cross-platform graphical toolkit and a front end for Octave was written with it not so long ago. The main build is for GNU/Linux with tendency towards KDE, but there is also a Windows port and the one which works best can currently be found in outsch.org. There is a ZIP archive in there, so download it with caution (it is not an official source). Finally, uncompress the file and install it in a suitable location of choice on your hard-drive partition (e.g. C:). When all the files are extracted from the ZIP archive find the qtoctave executable (qtoctave.exe) under the directory containing the DLL files and the other binaries. If necessary, create a convenient shortcut to this file. Unlike UNIX-type environments, paths in Windows are not quite as universal, so QtOctave may not have anything defined regarding the location of the octave executable. Depending on where it’s installed, it may need to be entered manually, otherwise QtOctave will not be able to access the very core and engine of Octave. If that’s the case, go to the “Config” menu (top menu), then “general configuration” (menu item), then “Octave”, “Octave path”. Put in the text field the full path to the Octave executable where you had it installed earlier. This ensures QtOctave knows where to find it. Restart QtOctave (for settings changes to take effect) and once the program can detect the executable ensure it can provide a command prompt for .m files to be run or for commands to be entered manually. If needed, run a basic function like plot just to ensure that graphical units of Octave are also fully supported and installed without any conflicts. QtOctave comes with several units including an editor and it integrates quite well, including drag-and-drop support.

The point of this whole exercise is to liberate users whose personal programs that they write are stuck in the “MATLAB trap”, so to speak (like the old “Java trap”).

If you are interested in converting fellow staff and their students to Octave, remember that it suits an educational environment much better as it encourages sharing and collaborating, not asking for permissions, paying heavy fees/fines, and begging developers to fix bugs rather than have access to the source code, which in turn enables participation. Additionally, most of the basic functions are truly compatible with MATLAB’s and the lack of JIT optimisation, for example, should not matter much in an educational setting. Not many people create MATLAB GUIs either, so there is hardly a need for such advanced functionality. At a later date I hope to make some screencasts about Octave.

Real-time Posts

Posts by @schestowitz

Retrieval statistics: 23 queries taking a total of 0.112 seconds • Please report low bandwidth using the feedback form
Original styles created by Ian Main (all acknowledgements) • PHP scripts and styles later modified by Roy Schestowitz • Help yourself to a GPL'd copy
|— Proudly powered by W o r d P r e s s — based on a heavily-hacked version 1.2.1 (Mingus) installation —|