Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
conI
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
LRT_infinite_dimensional_systems
conI
Commits
a0deba56
Commit
a0deba56
authored
4 years ago
by
Simon
Browse files
Options
Downloads
Patches
Plain Diff
animate_state.m and surfSparse.m small things
parent
2639154b
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
+misc/animate_state.m
+5
-1
5 additions, 1 deletion
+misc/animate_state.m
+misc/surfSparse.m
+50
-7
50 additions, 7 deletions
+misc/surfSparse.m
with
55 additions
and
8 deletions
+misc/animate_state.m
+
5
−
1
View file @
a0deba56
...
...
@@ -271,13 +271,17 @@ function [end_index, tot_time] = animation(start_index,infostruc)
end
end
matlab2tikz
(
'filename'
,
[
infostruc
.
exportPath
'/frame_'
,
num2str
(
t_idx
)],
...
'externalData'
,
true
,
'showInfo'
,
false
,
'checkForUpdates'
,
false
);
'externalData'
,
true
,
'showInfo'
,
false
,
'checkForUpdates'
,
false
,
'floatFormat'
,
'%.3e'
);
close
(
f
);
% fprintf([infostruc.exportPath '/t_' num2str(t_idx) '.tsv'],'infostruc.t_anim(t_idx)');
fid
=
fopen
([
infostruc
.
exportPath
'/t_'
num2str
(
t_idx
)
'.tsv'
],
'w'
);
% fprintf(fid, [ header1 ' ' header2 '\n']);
fprintf
(
fid
,
'%.2f'
,
infostruc
.
t_anim
(
t_idx
));
fclose
(
fid
);
fid
=
fopen
([
infostruc
.
exportPath
'/tFine_'
num2str
(
t_idx
)
'.tsv'
],
'w'
);
% fprintf(fid, [ header1 ' ' header2 '\n']);
fprintf
(
fid
,
'%.5f'
,
infostruc
.
t_anim
(
t_idx
));
fclose
(
fid
);
end
...
...
This diff is collapsed.
Click to expand it.
+misc/surfSparse.m
+
50
−
7
View file @
a0deba56
...
...
@@ -27,25 +27,44 @@ yGes = yGes(:).';
for
xIdx
=
1
:
ndiscX
-
1
for
yIdx
=
1
:
ndiscY
-
1
% create rectangles to connect
% problem: for pgfplots, if there is a node doube, it must not appear after each other.
if
~
isnan
(
val
(
xIdx
,
yIdx
))
if
~
isnan
(
val
(
xIdx
+
1
,
yIdx
))
&&
~
isnan
(
val
(
xIdx
+
1
,
yIdx
+
1
))
&&
~
isnan
(
val
(
xIdx
,
yIdx
+
1
))
idxLow
=
[
sub2ind
([
ndiscX
ndiscY
],
xIdx
,
yIdx
),
sub2ind
([
ndiscX
ndiscY
],
xIdx
+
1
,
yIdx
)];
idxHigh
=
[
sub2ind
([
ndiscX
ndiscY
],
xIdx
+
1
,
yIdx
+
1
),
sub2ind
([
ndiscX
ndiscY
],
xIdx
,
yIdx
+
1
)];
if
idxLow
(
1
)
==
idxLow
(
2
)
F
=
[
F
;
idxLow
(
1
)
idxHigh
idxLow
(
2
)];
elseif
idxHigh
(
1
)
==
idxHigh
(
2
)
F
=
[
F
;
idxHigh
(
1
)
idxLow
idxHigh
(
1
)];
else
F
=
[
F
;
idxLow
idxHigh
];
end
% F = [idxLow idxHigh];
% h = patch('Faces',F,'Vertices',[xGes;yGes;kGes].',...
% 'FaceVertexCData',kGes.','FaceColor','interp',varargin{:});
elseif
~
isnan
(
val
(
xIdx
+
1
,
yIdx
))
&&
~
isnan
(
val
(
xIdx
,
yIdx
+
1
))
idxLow
=
[
sub2ind
([
ndiscX
ndiscY
],
xIdx
,
yIdx
),
sub2ind
([
ndiscX
ndiscY
],
xIdx
+
1
,
yIdx
)];
idxHigh
=
[
sub2ind
([
ndiscX
ndiscY
],
xIdx
,
yIdx
+
1
),
sub2ind
([
ndiscX
ndiscY
],
xIdx
,
yIdx
+
1
)];
if
idxLow
(
1
)
==
idxLow
(
2
)
F
=
[
F
;
idxLow
(
1
)
idxHigh
idxLow
(
2
)];
elseif
idxHigh
(
1
)
==
idxHigh
(
2
)
F
=
[
F
;
idxHigh
(
1
)
idxLow
idxHigh
(
1
)];
else
F
=
[
F
;
idxLow
idxHigh
];
end
% F = [idxLow idxHigh];
% h = patch('Faces',F,'Vertices',[xGes;yGes;kGes].',...
% 'FaceVertexCData',kGes.','FaceColor','interp',varargin{:});
elseif
~
isnan
(
val
(
xIdx
+
1
,
yIdx
))
&&
~
isnan
(
val
(
xIdx
+
1
,
yIdx
+
1
))
idxLow
=
[
sub2ind
([
ndiscX
ndiscY
],
xIdx
,
yIdx
),
sub2ind
([
ndiscX
ndiscY
],
xIdx
+
1
,
yIdx
)];
idxHigh
=
[
sub2ind
([
ndiscX
ndiscY
],
xIdx
+
1
,
yIdx
+
1
),
sub2ind
([
ndiscX
ndiscY
],
xIdx
+
1
,
yIdx
+
1
)];
if
idxLow
(
1
)
==
idxLow
(
2
)
F
=
[
F
;
idxLow
(
1
)
idxHigh
idxLow
(
2
)];
elseif
idxHigh
(
1
)
==
idxHigh
(
2
)
F
=
[
F
;
idxHigh
(
1
)
idxLow
idxHigh
(
1
)];
else
F
=
[
F
;
idxLow
idxHigh
];
end
% F = [idxLow idxHigh];
% h = patch('Faces',F,'Vertices',[xGes;yGes;kGes].',...
% 'FaceVertexCData',kGes.','FaceColor','interp',varargin{:});
...
...
@@ -54,7 +73,13 @@ for xIdx=1:ndiscX-1
idxLow
=
repmat
(
sub2ind
([
ndiscX
ndiscY
],
xIdx
+
1
,
yIdx
),
1
,
2
);
idxHigh
(
1
)
=
sub2ind
([
ndiscX
ndiscY
],
xIdx
+
1
,
yIdx
+
1
);
idxHigh
(
2
)
=
sub2ind
([
ndiscX
ndiscY
],
xIdx
,
yIdx
+
1
);
if
idxLow
(
1
)
==
idxLow
(
2
)
F
=
[
F
;
idxLow
(
1
)
idxHigh
idxLow
(
2
)];
elseif
idxHigh
(
1
)
==
idxHigh
(
2
)
F
=
[
F
;
idxHigh
(
1
)
idxLow
idxHigh
(
1
)];
else
F
=
[
F
;
idxLow
idxHigh
];
end
% F = [idxLow idxHigh];
% h = patch('Faces',F,'Vertices',[xGes;yGes;kGes].',...
% 'FaceVertexCData',kGes.','FaceColor','interp',varargin{:});
...
...
@@ -92,7 +117,13 @@ for xIdx = 1:ndiscX
break
end
end
if
idxLow
(
1
)
==
idxLow
(
2
)
F
=
[
F
;
idxLow
(
1
)
idxHigh
idxLow
(
2
)];
elseif
idxHigh
(
1
)
==
idxHigh
(
2
)
F
=
[
F
;
idxHigh
(
1
)
idxLow
idxHigh
(
1
)];
else
F
=
[
F
;
idxLow
idxHigh
];
end
% FNew = [idxLow idxHigh];
% links unten
% h = patch('Faces',FNew,'Vertices',[xGes;yGes;kGes].',...
...
...
@@ -115,7 +146,13 @@ for xIdx = 1:ndiscX
idxHigh
(
2
)
=
sub2ind
([
ndiscX
,
ndiscY
],
xIdx
,
yIdx
-
1
);
end
end
if
idxLow
(
1
)
==
idxLow
(
2
)
F
=
[
F
;
idxLow
(
1
)
idxHigh
idxLow
(
2
)];
elseif
idxHigh
(
1
)
==
idxHigh
(
2
)
F
=
[
F
;
idxHigh
(
1
)
idxLow
idxHigh
(
1
)];
else
F
=
[
F
;
idxLow
idxHigh
];
end
% FNew = [idxLow idxHigh];
% % links oben
% h = patch('Faces',FNew,'Vertices',[xGes;yGes;kGes].',...
...
...
@@ -138,7 +175,13 @@ for xIdx = 1:ndiscX
idxHigh
(
2
)
=
sub2ind
([
ndiscX
,
ndiscY
],
xIdx
,
yIdx
-
1
);
end
end
if
idxLow
(
1
)
==
idxLow
(
2
)
F
=
[
F
;
idxLow
(
1
)
idxHigh
idxLow
(
2
)];
elseif
idxHigh
(
1
)
==
idxHigh
(
2
)
F
=
[
F
;
idxHigh
(
1
)
idxLow
idxHigh
(
1
)];
else
F
=
[
F
;
idxLow
idxHigh
];
end
% FNew = [idxLow idxHigh];
% rechts oben
% h = patch('Faces',FNew,'Vertices',[xGes;yGes;kGes].',...
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment