-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Divided the initial snippet and added more snippets
- Loading branch information
1 parent
c03fd4a
commit 3c11289
Showing
10 changed files
with
62 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
alphaVec = [3; 10]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
alphaVec = [10; 10]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
x0Vec = [0; 0; 0; 0]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
x0Vec = [pi / 8; pi / 8; 0; 0]; |
24 changes: 24 additions & 0 deletions
24
products/+elltool/+doc/+snip/s_chapter06_section07_snippet06.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
% after initializing we create ellipsoid for control function | ||
diagMat = diag(alphaVec); | ||
uEllObj = ellipsoid(diagMat); | ||
% define linear systems | ||
linSysObj=elltool.linsys.LinSysContinuous(aMat, bMat, uEllObj); | ||
% initialize direction matrix | ||
nDims = 4; | ||
nDirs = 1; | ||
dirMeshVec = 0 : (2 * pi / nDirs) : 2 * pi; | ||
dirNum = length(dirMeshVec) ^ nDims; | ||
[a1, a2, a3, a4] = ndgrid(dirMeshVec, dirMeshVec, dirMeshVec, dirMeshVec); | ||
lineDir1Mat = reshape(a1, [1, dirNum]); | ||
lineDir2Mat = reshape(a2, [1, dirNum]); | ||
lineDir3Mat = reshape(a3, [1, dirNum]); | ||
lineDir4Mat = reshape(a4, [1, dirNum]); | ||
dirMat = [lineDir1Mat; lineDir2Mat; lineDir3Mat; lineDir4Mat]; | ||
dirMat = dirMat(:, 2 : end); | ||
dirMat = dirMat ./ sqrt(repmat(sum(dirMat .^ 2, 1), nDims, 1)); | ||
% set of start coordinates | ||
x0EllObj = 1E-2 * ell_unitball(4) + x0Vec; | ||
% calculate solvability set | ||
timeVec = [endTime, 0]; | ||
rsTubeObj = elltool.reach.ReachContinuous(linSysObj, x0EllObj, dirMat, ... | ||
timeVec, 'isRegEnabled', true, 'isJustCheck', false, 'regTol', 1e-3); |
8 changes: 8 additions & 0 deletions
8
products/+elltool/+doc/+snip/s_chapter06_section07_snippet07.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
% create projection matrix and draw projection on current axis (z_3, z_4) | ||
velBasisMat = [0 0 1 0 ; 0 0 0 1]'; | ||
prTubeObj = rsTubeObj.projection(velBasisMat); | ||
prTubeObj.plotByIa(); | ||
hold on; | ||
ylabel('z_3'); zlabel('z_4'); | ||
title('Elipsoidal reach tube, proj. on subspace [0 0 1 0 ; 0 0 0 1]'); | ||
rotate3d on; |
8 changes: 8 additions & 0 deletions
8
products/+elltool/+doc/+snip/s_chapter06_section07_snippet08.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
% create projection matrix and draw projection on current axis (z_1, z_2) | ||
velBasisMat = [1 0 0 0 ; 0 1 0 0]'; | ||
prTubeObj = rsTubeObj.projection(velBasisMat); | ||
prTubeObj.plotByIa(); | ||
hold on; | ||
ylabel('z_1'); zlabel('z_2'); | ||
title('Elipsoidal reach tube, proj. on subspace [1 0 0 0 ; 0 1 0 0]'); | ||
rotate3d on; |
8 changes: 8 additions & 0 deletions
8
products/+elltool/+doc/+snip/s_chapter06_section07_snippet09.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
% create projection matrix and draw projection on current axis (z_1, z_3) | ||
velBasisMat = [1 0 0 0 ; 0 0 1 0]'; | ||
prTubeObj = rsTubeObj.projection(velBasisMat); | ||
prTubeObj.plotByIa(); | ||
hold on; | ||
ylabel('z_1'); zlabel('z_3'); | ||
title('Elipsoidal reach tube, proj. on subspace [1 0 0 0 ; 0 0 1 0]'); | ||
rotate3d on; |
8 changes: 8 additions & 0 deletions
8
products/+elltool/+doc/+snip/s_chapter06_section07_snippet10.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
% create projection matrix and draw projection on current axis (z_2, z_4) | ||
velBasisMat = [0 1 0 0 ; 0 0 0 1]'; | ||
prTubeObj = rsTubeObj.projection(velBasisMat); | ||
prTubeObj.plotByIa(); | ||
hold on; | ||
ylabel('z_2'); zlabel('z_4'); | ||
title('Elipsoidal reach tube, proj. on subspace [0 1 0 0 ; 0 0 0 1]'); | ||
rotate3d on; |