-
Notifications
You must be signed in to change notification settings - Fork 1
/
install_osqp.m
36 lines (28 loc) · 871 Bytes
/
install_osqp.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
function install_osqp
% Install the OSQP solver Matlab interface
% Get current operating system
if ispc
platform = 'windows';
elseif ismac
platform = 'mac';
elseif isunix
platform = 'linux';
end
fprintf('Downloading binaries...');
package_name = sprintf('https://github.com/osqp/osqp-matlab/releases/latest/download/osqp-matlab-%s64.tar.gz', platform);
websave('osqp.tar.gz', package_name);
fprintf('\t\t\t\t[done]\n');
fprintf('Unpacking...');
untar('osqp.tar.gz','osqp')
fprintf('\t\t\t\t\t[done]\n');
fprintf('Updating path...');
cd osqp
addpath(genpath(pwd));
savepath
cd ..
fprintf('\t\t\t\t[done]\n');
fprintf('Deleting temporary files...');
delete('osqp.tar.gz');
fprintf('\t\t\t[done]\n');
fprintf('OSQP is successfully installed!\n');
end