WICHTIG: Der Betrieb von goMatlab.de wird privat finanziert fortgesetzt. - Mehr Infos...

Mein MATLAB Forum - goMatlab.de

Mein MATLAB Forum

 
Gast > Registrieren       Autologin?   

Partner:




Forum
      Option
[Erweitert]
  • Diese Seite per Mail weiterempfehlen
     


Gehe zu:  
Neues Thema eröffnen Neue Antwort erstellen

gui erstellen mit octave

 

thunder
Forum-Anfänger

Forum-Anfänger


Beiträge: 11
Anmeldedatum: 27.08.08
Wohnort: ---
Version: R2010a Unix (Ubuntu)
     Beitrag Verfasst am: 21.08.2009, 16:48     Titel: gui erstellen mit octave
  Antworten mit Zitat      
Hallo ich bin frisch umgestiegen auf octave bzw. dabei mich hier einzuarbeiten.

ein simulink derivat für octave gibt es nicht, soviel weiß ich schon. eine andere frag ediesbezüglich stellt siuch mir undzwar, ist es möglich mit octave ein gui zu erstellen?

ich nutze qtoctave auf ubuntu.

VIelen dank
Private Nachricht senden Benutzer-Profile anzeigen


aj.geissler
Forum-Guru

Forum-Guru



Beiträge: 251
Anmeldedatum: 26.11.07
Wohnort: Seeheim-Jugenheim
Version: ---
     Beitrag Verfasst am: 04.02.2010, 17:11     Titel:
  Antworten mit Zitat      
Hi,

das ist halt ein Vorteil von MatLab.

Derzeit ist die Nutzung von GUI-Elementen mehr als stiefmütterlich in Octave umgesetzt. Habe zum Beispiel im Internet erst einen vergleichbaren Befehl für uigetfile gefunden.

Ich habe bisher auch keine Buttons oder andere Elemente gefunden.

Bei QtOctave aber kannst Du Benutzermenus definieren, die dann vom "Hauptfenster" aus der symbolleiste aufrufbar sind.

Zitat:

QtOctave menus.
QtOctave menus can be found in /usr/local/share/qtoctave/menus/ or can be located in user's home.
Menus in /usr/local/share/qtoctave/menus/ are read for all users.
Menus in user's home are read only for user.
Menus in user's home are located in ~/.qtoctave/menus/.
Some menus are fixed and cannot be edited.
Menus structure.
Every folder you put in menus folder represents menus. Inside of this folder you can put other menus.
For example, if you you want put a new menu in help menu, you must create a new folder in menus folder called help. Inside of help folder you will put your new menus.
There are two ways of build menus: Simple and complete.
Simple way of build menus.
Only add to your menu folder a .menu file.There is and example of .menu file:
#This is an example of menu for qtoctave

menu_name=Menu title

input_label= Parameter 1
input= parameter1

input_label= Parameter 2
input= parameter2

input_label= Parameter 3
input=

output_label= Output Parameter 1
output= output1

output_label= Output Parameter 2
output= output2

begin{help}
<html>
<body>
<b>This is an example.</b><br>
Help of example.
</body>
</html>
end{help}

begin{command}
title("%i1%");
sombrero(%i2%);
[%o1%,%o2%] = hola (%i1%,%i2%,%i3%);
end{command}

Lines starting with # are commens.
menu_name property is name of menu window.
input_label is label of input parameter.
input property is name of this parameter in code. You can add all parameters you need.
input_file property is name of file in code.
begin{input_list}...end{input_list} lets select one property from list inside begin{input_list} and end{input_list}. Each line represents one option.
output_label, output, begin{output_list}...end{output_list} and output_file properties are similar with output parameters.
begin{command}...end{command} is code that will be passed to octave.
%i1% is 1st input parameter, %i2% is second input parameter,...
%o1% is 1st output parameter, %o2% is second output parameter,...
begin{help}...end{help} is this menu help. Help must be in html. This parameter is not needed.
Example: Easy integrate.menu has the next code:
#This is an example of menu for qtoctave

menu_name= Integrate Function Easy

input_label= Function name f(x)
input=

input_label= 1st limit of integration
input=

input_label= 2st limit of integration
input=

output_label= Value
output=v

output_label=ier
output=ier

output_label= nfun
output=nfun

output_label=err
output=err

begin{help}
<html>
<p><b>Integrate a nonlinear function of one variable using Quadpack.</b></p><br>
Use quad function for more options.<br><br>
<br> The first argument is the name of the function, the function handle or the inline function to call to compute the value of the integrand. It must have the form:<br>
y = f (x)<br>
where y and x are scalars.<br>
This parameter is a string. Ex.:<br>
[v, ier, nfun, err] = quad ("f", 0, 3)<br><br>
<br> The second and third arguments are limits of integration. Either or both may be infinite.<br><br>
<br> You can use the function quad_options to set optional parameters for quad.<br>
</html>
end{help}

begin{command}
[%o1%, %o2%, %o3%, %o4%] = quad ("%i1%",%i2%,%i3%)
end{command}

This code creates this menu:

Complete way of build menus.
Is very similar. You can put an executable file in menus folder and QtOctave will put in menu. When user selects this menu, QtOctave executes this file and sends output to Octave.
Example:
You can put this code in file called Sombrero function:
#!/bin/cat
title('Sombrero');
sombrero(20);
Then put this file in menus folder and make it executable using:
chmod +x "Sombrero function"
This menu will appear in QtOctave and makes plot of sombrero function.
Menu's icon.
Putting icons to menus is very simple. If you have an ej.menu file (or other), you must put ex.menu.png icon in the same place that ex.menu. That is all.


Hilft Dir das weiter ?

Grüße
_________________

Andreas Geißler
Private Nachricht senden Benutzer-Profile anzeigen
 
Schnumbl

Gast


Beiträge: ---
Anmeldedatum: ---
Wohnort: ---
Version: ---
     Beitrag Verfasst am: 05.11.2010, 22:21     Titel: GUIs mit Octave und Java
  Antworten mit Zitat      
http://octave.1599824.n4.nabble.com.....-octave-td2019418i20.html
 
Neues Thema eröffnen Neue Antwort erstellen



Einstellungen und Berechtigungen
Beiträge der letzten Zeit anzeigen:

Du kannst Beiträge in dieses Forum schreiben.
Du kannst auf Beiträge in diesem Forum antworten.
Du kannst deine Beiträge in diesem Forum nicht bearbeiten.
Du kannst deine Beiträge in diesem Forum nicht löschen.
Du kannst an Umfragen in diesem Forum nicht mitmachen.
Du kannst Dateien in diesem Forum posten
Du kannst Dateien in diesem Forum herunterladen
.





 Impressum  | Nutzungsbedingungen  | Datenschutz | FAQ | goMatlab RSS Button RSS

Hosted by:


Copyright © 2007 - 2024 goMatlab.de | Dies ist keine offizielle Website der Firma The Mathworks

MATLAB, Simulink, Stateflow, Handle Graphics, Real-Time Workshop, SimBiology, SimHydraulics, SimEvents, and xPC TargetBox are registered trademarks and The MathWorks, the L-shaped membrane logo, and Embedded MATLAB are trademarks of The MathWorks, Inc.