Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
linear_map
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
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
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
Show more breadcrumbs
Martino Calzavara
linear_map
Commits
94f2cdb7
Commit
94f2cdb7
authored
2 weeks ago
by
marti
Browse files
Options
Downloads
Patches
Plain Diff
Solved bug in saving gaoptions
parent
5447e86a
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
linear_map.m
+17
-8
17 additions, 8 deletions
linear_map.m
with
17 additions
and
8 deletions
linear_map.m
+
17
−
8
View file @
94f2cdb7
...
@@ -12,11 +12,11 @@ close all;
...
@@ -12,11 +12,11 @@ close all;
%% Global parameters
%% Global parameters
DMDdirectory
=
'.\data\DMD_patterns\'
;
% DMD patterns folder, don't forget the last forward (or backward in Windows) slash
DMDdirectory
=
'.\data\DMD_patterns\'
;
% DMD patterns folder, don't forget the last forward (or backward in Windows) slash
PICdirectory
=
'.\data\PIC_Merc2\'
;
% Pictures folder, don't forget the last forward (or backward in Windows) slash
PICdirectory
=
'.\data\PIC_Merc2\'
;
% Pictures folder, don't forget the last forward (or backward in Windows) slash
filename_results
=
'.\results.mat'
;
% write results to this file
filename_results
=
'.\results.mat'
;
% write results to this file
filename_init
=
'
.\
results.mat'
;
% use results from previous run to initialize this run
filename_init
=
'results.mat'
;
% use results from previous run to initialize this run
file_index
=
2
;
% DMD/Picture to use for learning (1=large TU Wien logo). Indexed as in variable PICfiles.
file_index
=
2
;
% DMD/Picture to use for learning (1=large TU Wien logo). Indexed as in variable PICfiles.
reflection
=
true
;
% true (false): force optimization to det(A)<0 (>0)
reflection
=
true
;
% true (false): force optimization to det(A)<0 (>0)
genetic_opt
=
tru
e
;
% run (or not) genetic optimization (set to false if you only want very fine tuning)
genetic_opt
=
fals
e
;
% run (or not) genetic optimization (set to false if you only want very fine tuning)
PIC_format
=
'.png'
;
% picture format
PIC_format
=
'.png'
;
% picture format
invertDMD
=
false
;
% if necessary, set this to true to use the negative of DMD
invertDMD
=
false
;
% if necessary, set this to true to use the negative of DMD
invertPIC
=
false
;
% if necessary, set this to true to use the negative of PIC
invertPIC
=
false
;
% if necessary, set this to true to use the negative of PIC
...
@@ -144,11 +144,20 @@ disp(log(infidelity(model_parameters.parvec, DMD{file_index}, PIC{file_index})))
...
@@ -144,11 +144,20 @@ disp(log(infidelity(model_parameters.parvec, DMD{file_index}, PIC{file_index})))
%% Save results
%% Save results
metadata
=
struct
(
'DMDfiles'
,
DMDfiles
,
'PICfiles'
,
PICfiles
,
...
if
genetic_opt
'reflection'
,
reflection
,
'index'
,
file_index
,
'optflag'
,
exitflag
,
...
metadata
=
struct
(
'DMDfiles'
,
DMDfiles
,
'PICfiles'
,
PICfiles
,
...
'optoutput'
,
optoutput
,
'gaoptions'
,
gaoptions
,
'nmoptions'
,
nmoptions
,
...
'reflection'
,
reflection
,
'index'
,
file_index
,
'optflag'
,
exitflag
,
...
'DMDsize'
,
size
(
DMD
{
file_index
}),
'PICsize'
,
size
(
PIC
{
file_index
}),
...
'optoutput'
,
optoutput
,
'gaoptions'
,
gaoptions
,
'nmoptions'
,
nmoptions
,
...
'original_DMDsize'
,
original_DMDsize
,
'original_PICsize'
,
original_PICsize
);
'DMDsize'
,
size
(
DMD
{
file_index
}),
'PICsize'
,
size
(
PIC
{
file_index
}),
...
'original_DMDsize'
,
original_DMDsize
,
'original_PICsize'
,
original_PICsize
);
else
metadata
=
struct
(
'DMDfiles'
,
DMDfiles
,
'PICfiles'
,
PICfiles
,
...
'reflection'
,
reflection
,
'index'
,
file_index
,
'optflag'
,
exitflag
,
...
'optoutput'
,
optoutput
,
'nmoptions'
,
nmoptions
,
...
'DMDsize'
,
size
(
DMD
{
file_index
}),
'PICsize'
,
size
(
PIC
{
file_index
}),
...
'original_DMDsize'
,
original_DMDsize
,
'original_PICsize'
,
original_PICsize
);
end
% A collection of useful prepackaged functions:
% A collection of useful prepackaged functions:
...
...
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