rewrite code from matlab to octave

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

rewrite code from matlab to octave

alzubi982
Hello ,
My name is maen alzubi

I have a Task to rewrite the code from matlab to octave but my problem is rewriting the GUI in matlab to GUI in octave .
I need to build GUI like Matlab in octave and calling the function in the same matlab ,



this code how can I write this in octave and definition the handles and others
*********************************************************


function varargout = FRIT(varargin)
% Graphical user interface for the Fuzzy Rule Interpolation (FRI) ToolBox
%      FRIT, by itself, creates a new FRIT or raises the existing
%      singleton*.
%
%      H = FRIT returns the handle to a new FRIT or the handle to
%      the existing singleton*.
%
%      FRIT('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in FRIT.M with the given input arguments.
%
%      FRIT('Property','Value',...) creates a new FRIT or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before FRIT_OpeningFunction gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to FRIT_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help FRIT

% Last Modied by GUIDE v2.5 30-Sep-2007 16:32:53

% FREE SOFTWARE - please refer the source
% Copyright (c) 2005-2006 by
%    Zsolt Csaba Johanyák, GAMF Faculty, Kecskemét College, Hungary
%    Domonkos Tikk Budapest University of Technology and Economics, Hungary
%    Szilveszter Kovács University of Miskolc, Hungary
%    K.W. Murdoch University, Western Australia
% http://fri.gamf.hu
%
% We are grateful for every suggestion and hint which improves this
% programme.
%
% This programme is free software; you can redistribute it and/or
% modify it under the terms of the GNU General Public License
% as published by the Free Software Foundation; either version 2
% of the License, or any later version.
%
% This programme is distributed in the hope that it will be useful,
% but WITHOUT ANY WARRANTY; without even the implied warranty of
% MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
% GNU General Public License for more details.

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @FRIT_OpeningFcn, ...
                   'gui_OutputFcn',  @FRIT_OutputFcn , ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
               
if nargin && ischar(varargin{1})
      gui_State.gui_Callback = str2func(varargin{1})
end

[pathstr, name, ext] = fileparts(which('FRIT'));
cd(pathstr);

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:})
else
    gui_mainfcn(gui_State, varargin{:})
end
% End initialization code - DO NOT EDIT


% --- Executes just before FRIT is made visible.
function FRIT_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to FRIT (see VARARGIN)

% Choose default command line output for FRIT
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);

% UIWAIT makes FRIT wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = FRIT_OutputFcn(hObject, eventdata, handles)
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;
Reply | Threaded
Open this post in threaded view
|

Fwd: Re: rewrite code from matlab to octave

NJank

---------- Forwarded message ----------
From: "ma`en al-zu`bi" <[hidden email]>
Date: May 11, 2017 6:51 PM
Subject: Re: rewrite code from matlab to octave
To: "Nicholas Jankowski" <[hidden email]>
Cc:

dear Nicholas Jankowski 
thanks for answering me, 

the error in mainFNC, already I built the GUI in octave by (UICONTROL). 

please finds the attached I sent to you the code in Matlab and in octave.
if you can see inside the files and tell me how can I define the GUI in octave 

regards, 


 




On Thursday, May 11, 2017 10:22 PM, Nicholas Jankowski <[hidden email]> wrote:


On Thu, May 11, 2017 at 11:42 AM, alzubi982 <[hidden email]> wrote:
Hello ,
My name is maen alzubi

I have a Task to rewrite the code from matlab to octave but my problem is
rewriting the GUI in matlab to GUI in octave .
I need to build GUI like Matlab in octave and calling the function in the
same matlab ,



this code how can I write this in octave and definition the handles and
others
****************************** ***************************


<snip>

the first error is on gui_mainfcn.  It seems these functions are making use of the Matlab's GUIDE application development tool.  While Octave has some UI development functions [1], it does not have much of the GUIDE functionality emulated. You will have to re-code the functions using other GUI functions if possible.

[1] https://www.gnu.org/software/octave/doc/interpreter/GUI-Development.html


Sorry I realized I forgot to include the help list on my last reply to you. I have included the attachments here. Unfortunately I do not know much about how to create a GUI, so I'm unable to help you. Perhaps someone else on the list can

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

matlab.fig (6K) Download Attachment
matlab.m (60K) Download Attachment
octave.m (60K) Download Attachment