Skip to content

Commit 9f28f92

Browse files
added bobyqa fortran compilation script
1 parent 4720ed0 commit 9f28f92

File tree

3 files changed

+11
-32
lines changed

3 files changed

+11
-32
lines changed

bobyqa/Makefile

Lines changed: 0 additions & 31 deletions
This file was deleted.

bobyqa/bobyqa.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@
4242
%% main part
4343

4444
if ~exist('mexbobyqa', 'file')
45-
error('mexbobyqa does not exist. Please compile it first from Fortran.');
45+
error(sprintf(['The mexbobyqa file does not exist. Please compile it first\n',...
46+
'by running the file compile_mexbobyqa.m in the bobyqa directory.']));
4647
end
4748

4849
bobyqafun_sfbg = fun;

bobyqa/compile_mexbobyqa.m

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
% Run this file once in order to compile the mexbobyqa.F file to the mexbobyqa.mex***
2+
% format, which can be recognized by Matlab. Then you will be able to use the
3+
% bobyqa.m function.
4+
5+
% Required: Your current Matlab installation must be connected to a Fortran compiler.
6+
% For further information see:
7+
% https://mathworks.com/help/matlab/build-fortran-mex-files-1.html
8+
9+
mex mexbobyqa.F

0 commit comments

Comments
 (0)