MATLAB Answers

Implementing the Feval function in matlab

2 views (last 30 days)
William Murphy
William Murphy on 14 May 2014
Edited: Geoff Hayes on 7 Mar 2015
Question: I am having a hard time with implementing the feval function in matlab, it's one of the only aspects holding me up
function varargout = noise(varargin)
% NOISE M-file for Noise.fig
% NOISE, by itself, creates a new NOISE or raises the existing
% singleton*.
%
% H = NOISE returns the handle to a new NOISE or the handle to
% the existing singleton*.
%
% NOISE('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in NOISE.M with the given input arguments.
%
% NOISE('Property','Value',...) creates `a new NOISE or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before noise_OpeningFunction gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to noise_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 noise
% Last Modified by GUIDE v2.5 27-Oct-2003 22:16:23
% Begin initialization code - DO NOT EDIT
gui_Singleton = 0;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @noise_OpeningFcn, ...
'gui_OutputFcn', @noise_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', @Frequency_Callback, ...
'gui_Octave', @Octave_Callback, ...
'gui_Octave3', @Octave3_Callback,...
'gui_peak', @PeakLevel_Callback, ...
'gui_lgcallback', @Leq_Callback, ...
'gui_duracback', @BDuration_Callback, ...
'gui_kcallback', @Kurtosis_Callback, ...
'gui_tspaceback', @TSpacing_Callback, ...
'gui_closefunct', @figure1_CloseRequestFcn, ...
'gui_impulcallk', @ImpulseNum_Callback,...
'gui_LeqA8_Call', @LeqA8_Callback, ...
'gui_militarystd', @MILSTD_Callback, ...
'gui_AHUs_Callba', @AHUs_Callback, ...
'gui_PkRangecall', @PeakRange_Callback, ...
'gui_saveCallba', @save_Callback, ...
'gui_hFigure', @hfigure, ...
'gui_Handles', @tophandles);
if (nargin && ischar(varargin{1}))
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
%[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
[varargout{1:nargout}] = feval(gui_State.gui_OutputFcn, gui_State.gui_hFigure, [], gui_State.gui_Handles);
else
feval(gui_State.gui_OutputFcn, gui_State.gui_hFigure, [], gui_State.gui_Handles, varargin{:}); % Error here?
%gui_mainfcn(gui)State, varargin{:}); gui_State.gui_OutputFcn, gui_hFigure, [], gui_Handles
end
% if nargout
% [varargout{1:nargout}] = feval(varargin{:});
%else
% feval(varargin{:});
%end
% End initialization code - DO NOT EDIT
The errors below:
Error using noise>noise_OutputFcn
Too many input arguments.
Error in noise (line 60)
feval(gui_State.gui_OutputFcn, gui_State.gui_hFigure, [], gui_State.gui_Handles,
varargin{:}); % Error here?

  0 Comments

Sign in to comment.

Answers (0)

Tags


Translated by