I need to create a basic GUI for use with Octave; what to use?

Discussion in 'Webmastering & Programming' started by Uncle Humjaba, Oct 6, 2011.

  1. Uncle Humjaba

    Uncle Humjaba Limp Gawd

    Messages:
    408
    Joined:
    May 6, 2006
    Basically, I have a program written for Octave. I would like to create a GUI that will allow the user to specify an input file, hit "Go" and then view all of the pretty plots and information in one window. Later on, I would like to be able to submit this information to a web-based (mySQL most likely) database, so it can be viewed from my PHP-based web application.

    As a student, I have access to MS Visual Studio and many other tools, though I would like to avoid any redistribution rights issues and keep this as open-source as possible. So I've been messing around with Netbeans and Java SE and I've gotten some some basic stuff to happen (press this button to make this value change, etc. etc.) but my goodness, learning a new language isn't fun.

    For reference, here is the kind of code I will be running through octave. If this could be easily replicated in Java or some other GUI-friendly language, I'm open to that as well. http://pastebin.com/Ld5knhtR

    Thanks in advance!

    Also:
    This looks promising, but I've had no luck invoking it.. http://jopas.sourceforge.net/index.html
    I would really be happy with just being able to do something like octave_exec("run myfile.m"); and capture the plot outputs. I just have zero experience with Java and I feel like I'm jumping in the deep end before knowing how to swim.
     
  2. PTNL

    PTNL [H]ardness Supreme

    Messages:
    4,190
    Joined:
    Jan 2, 2005
    First of all, I'm not familiar with Octave.... However, it is you -- not the IDE manufacturer -- that decides the end user agreement, licensing, and usage terms. It's your code, so it's your decision whether to post the source code or obfuscate. If Octave can be interacted/used/whatever from C++ or a managed code perspective, then I don't see an issue with using Visual Studio to write the code. Alternatively, you may need to write your own middle tier to facilitate communication between Octave and whatever platform you decide.
     
  3. Arainach

    Arainach 2[H]4U

    Messages:
    2,352
    Joined:
    Feb 25, 2006
    That's not entirely true. Look at the EULA for MSDN student agreements and whatnot.
     
  4. Whatsisname

    Whatsisname [H]ardForum Junkie

    Messages:
    10,204
    Joined:
    Nov 15, 2000
    are you running octave on a windows or linux box?
     
  5. Uncle Humjaba

    Uncle Humjaba Limp Gawd

    Messages:
    408
    Joined:
    May 6, 2006
    Sorry, Octave is an open-source MatLab equivalent (basically a mathematical suite). It runs from the command line, and I'm running Windows.

    This is all I've done so far in Octave - if this can be done easily in Java or C++, I don't really even need Octave. I need to import data from a CSV file, numerically differentiate that data, and then plot the data points. I also need to draw a couple of circles on the plot. I can even write a function to numerically differentiate - that's not hard.
     
  6. CEpeep

    CEpeep [H]ardness Supreme

    Messages:
    6,061
    Joined:
    Oct 23, 2004
    Have you checked GUIOctave? It already shows you all the fancy stuff in one window. Might be easier to write a module to export the data in the way you need rather than building something completely new from scratch.
     
  7. PTNL

    PTNL [H]ardness Supreme

    Messages:
    4,190
    Joined:
    Jan 2, 2005
    True... Looks like MS clarified certain verbage in the 2010 releases. The OP should be fine so as long as this stays academic in scope and doesn't become a commercial product.
     
  8. Uncle Humjaba

    Uncle Humjaba Limp Gawd

    Messages:
    408
    Joined:
    May 6, 2006
    So it looks like C++ is more easy to work with than Java (with and without octave, which has an officially supported C++ api), so I'm downloading Visual Studio.

    I'm getting the Dreamspark version, because I dont want to hand my laptop off to the campus IT department to have it installed. This won't ever be used outside of academia, I don't imagine, and certainly not commercially. So I should be fine.