Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
alta
alta
Commits
2efea9db
Commit
2efea9db
authored
Aug 20, 2013
by
Laurent Belcour
Browse files
Fixing errors in the matlab implementation of the rational fitter
parent
827abdab
Changes
3
Hide whitespace changes
Inline
Side-by-side
sources/core/plugins_manager.cpp
View file @
2efea9db
...
...
@@ -43,6 +43,7 @@ template<typename T> T open_library(const std::string& filename, const char* fun
else
{
std
::
cerr
<<
"<<ERROR>> unable to load the dynamic library file
\"
"
<<
filename
<<
"
\"
"
<<
std
::
endl
;
std
::
cerr
<<
" cause:
\"
"
<<
dlerror
()
<<
"
\"
"
<<
std
::
endl
;
return
NULL
;
}
#endif
...
...
sources/plugins/rational_fitter_matlab/rational_fitter.cpp
View file @
2efea9db
...
...
@@ -21,9 +21,15 @@ ALTA_DLL_EXPORT fitter* provide_fitter()
rational_fitter_matlab
::
rational_fitter_matlab
()
{
// Create matlab engine
if
(
!
(
ep
=
engOpen
(
""
)))
{
std
::
cerr
<<
"<ERROR>> can't start MATLAB engine"
<<
std
::
endl
;
}
}
rational_fitter_matlab
::~
rational_fitter_matlab
()
{
engClose
(
ep
);
}
bool
rational_fitter_matlab
::
fit_data
(
const
data
*
dat
,
function
*
fit
,
const
arguments
&
args
)
...
...
@@ -36,14 +42,6 @@ bool rational_fitter_matlab::fit_data(const data* dat, function* fit, const argu
return
false
;
}
// Create matlab engine
if
(
!
(
ep
=
engOpen
(
""
)))
{
std
::
cerr
<<
"<ERROR>> can't start MATLAB engine"
<<
std
::
endl
;
return
false
;
}
// I need to set the dimension of the resulting function to be equal
// to the dimension of my fitting problem
r
->
setDimX
(
d
->
dimX
())
;
...
...
@@ -85,7 +83,6 @@ bool rational_fitter_matlab::fit_data(const data* dat, function* fit, const argu
}
}
engClose
(
ep
);
return
false
;
}
...
...
sources/plugins/rational_fitter_matlab/rational_fitter.h
View file @
2efea9db
...
...
@@ -28,11 +28,6 @@ class rational_fitter_matlab : public fitter
//
virtual
void
set_parameters
(
const
arguments
&
args
)
;
// Obtain associated data and functions
//
virtual
data
*
provide_data
()
const
;
virtual
function
*
provide_function
()
const
;
protected:
// function
// Fitting a data object using np elements in the numerator and nq
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment