-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathto_latex.m
45 lines (42 loc) · 1.59 KB
/
to_latex.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
37
38
39
40
41
42
43
44
45
% generating text for A, b
n = size(A, 1);
m = size(A, 3);
disp('A random-generated example is studied:');
disp('');
disp('{\tiny');
for k = 1:m
fprintf('$A_%d=\\left(\\arraycolsep=1.4pt\\def\\arraystretch{1}\n', k);
fprintf('\\begin{array}{%s}\n', repmat('c', 1, n));
%latex(A(:, :, k), 'nomath', '%d');
latex1(A(:, :, k));
disp('\end{array}\right)$,');
end
for k = 1:m
fprintf('$b_%d=\\left(\\arraycolsep=1.4pt\\def\\arraystretch{1}\n', k)
disp('\begin{array}{c}');
%latex(b(:, k), 'nomath', '%d')
latex1(b(:, k));
disp('\end{array}\right)$.')
end
disp('}');
disp('');
%%
disp('For this map, a number of tests were conducted.');
fprintf('First the boundary oracle for $y=0$ and $d$ was called and returned correctly with a value of $%.10f$\n', t);
disp('In addition, the normal vector $c$ at the boundary was found.');
disp('Moreover, the algorithm for discovering boundary non-convexities returned a $c_-$, therefore, certifying that the map is non-convex.');
disp('A vector $c_+$ was discovered.');
fprintf('For that $c_+$ and a default initial guess $z_{\\max}=%.2f$ the value $z_{\\max}=%.2f$ was found using $100$ iterations of non-convexity certificate.\n', z_max_guess, z_max);
disp('');
disp('$d=\left(\begin{array}{c}');
latex(d, 'nomath', '%.2f');
disp('\end{array}\right)$,');
disp('$c=\left(\begin{array}{c}');
latex(c_d, 'nomath', '%.2f');
disp('\end{array}\right)$,');
disp('$c_-=\left(\begin{array}{c}');
latex(c_minus, 'nomath', '%.2f');
disp('\end{array}\right)$,');
disp('$c_+=\left(\begin{array}{c}');
latex(c_plus, 'nomath', '%.2f');
disp('\end{array}\right)$,');