Skip to content

Commit 09fc9c5

Browse files
committed
Adding project report
1 parent 3507215 commit 09fc9c5

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

.DS_Store

10 KB
Binary file not shown.

OPTIM_project.pdf

3.88 MB
Binary file not shown.

visualizations/spectraplex1.fig

178 KB
Binary file not shown.

visualizations/spectraplex1.png

50.1 KB
Loading

visualizations/spectraplex3.m

+9-9
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,20 @@
33
hold on;
44
axis equal;
55

6-
x = 0:.02:2;
7-
y = 0:.02:2;
6+
x = 0:1:40;
7+
y = 0:1:50;
88

99
set(gcf,'color','w');
1010
[X,Y] = meshgrid(x,y);
1111
Z = sqrt(X.*Y);
1212

1313
% Plot the lower half of the cone
1414
surf(X,Y,-Z,'edgecolor','none');
15+
surf(X,Y,Z,'edgecolor','none');
1516
shading interp
1617

1718
% Define grid points
18-
[X, Y] = meshgrid(linspace(0, 2, 50), linspace(0, 2, 50));
19+
[X, Y] = meshgrid(linspace(0, 40, 50), linspace(0, 50, 50));
1920

2021
% Define the plane x + z = 1
2122
Z_plane = 1 - X;
@@ -25,22 +26,21 @@
2526

2627
% Plot the feasible region below the plane
2728
% Create a mask for the feasible region
28-
mask = (X + Z_plane >= 0); % Only plot below the plane
29+
% mask = (X + Z_plane >= 0); % Only plot below the plane
2930

3031
% Set values outside the feasible region to NaN
31-
Z_plane(~mask) = NaN;
32+
% Z_plane(~mask) = NaN;
3233

3334
% Plot the feasible region (intersection between cone and plane)
3435
surf(X, Y, Z_plane, 'FaceAlpha', 0.5, 'EdgeColor', 'none', 'FaceColor', 'blue');
3536

3637
xlabel('x');
3738
ylabel('y');
3839
zlabel('z');
39-
title('Intersection between Cone and Plane x + z = 1');
40+
title('Trace constrained cone of PSD matrices');
4041
axis equal;
4142

4243
view([62,24]);
43-
xlabel('X-axis');
44-
ylabel('Y-axis');
45-
zlabel('Z-axis');
44+
xlim([0 50])
45+
zlim([-30 30])
4646

0 commit comments

Comments
 (0)