Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
J
juobs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Javier Ugarrio
juobs
Commits
fa605a1b
Commit
fa605a1b
authored
1 year ago
by
Antonino D'Anna
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added savepl::Bool parameter to mpcac default false
parent
7dc1d023
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
src/juobs_obs.jl
src/juobs_obs.jl
+10
-7
No files found.
src/juobs_obs.jl
View file @
fa605a1b
...
@@ -92,7 +92,7 @@ m12 = mpcac(corr_a0p, corr_pp, [50, 60], pl=false, ca=ca)
...
@@ -92,7 +92,7 @@ m12 = mpcac(corr_a0p, corr_pp, [50, 60], pl=false, ca=ca)
"""
"""
function
mpcac
(
a0p
::
Vector
{
uwreal
},
pp
::
Vector
{
uwreal
},
plat
::
Vector
{
Int64
};
ca
::
Float64
=
0.0
,
pl
::
Bool
=
true
,
data
::
Bool
=
false
,
function
mpcac
(
a0p
::
Vector
{
uwreal
},
pp
::
Vector
{
uwreal
},
plat
::
Vector
{
Int64
};
ca
::
Float64
=
0.0
,
pl
::
Bool
=
true
,
data
::
Bool
=
false
,
kappa
::
Union
{
Vector
{
Float64
},
Nothing
}
=
nothing
,
mu
::
Union
{
Vector
{
Float64
},
Nothing
}
=
nothing
,
kappa
::
Union
{
Vector
{
Float64
},
Nothing
}
=
nothing
,
mu
::
Union
{
Vector
{
Float64
},
Nothing
}
=
nothing
,
wpm
::
Union
{
Dict
{
Int64
,
Vector
{
Float64
}},
Dict
{
String
,
Vector
{
Float64
}},
Nothing
}
=
nothing
)
wpm
::
Union
{
Dict
{
Int64
,
Vector
{
Float64
}},
Dict
{
String
,
Vector
{
Float64
}},
Nothing
}
=
nothing
,
savepl
::
Bool
=
false
)
corr_a0p
=
-
a0p
[
1
:
end
]
corr_a0p
=
-
a0p
[
1
:
end
]
corr_pp
=
pp
[
1
:
end
]
corr_pp
=
pp
[
1
:
end
]
...
@@ -129,18 +129,21 @@ function mpcac(a0p::Vector{uwreal}, pp::Vector{uwreal}, plat::Vector{Int64}; ca:
...
@@ -129,18 +129,21 @@ function mpcac(a0p::Vector{uwreal}, pp::Vector{uwreal}, plat::Vector{Int64}; ca:
_
,
max_idx
=
findmax
(
value
.
(
pp
))
_
,
max_idx
=
findmax
(
value
.
(
pp
))
ylim
(
v
-
20
*
e
,
v
+
20
*
e
)
ylim
(
v
-
20
*
e
,
v
+
20
*
e
)
xlim
(
left
=
max_idx
)
xlim
(
left
=
max_idx
)
filename
=
""
if
!
isnothing
(
kappa
)
if
!
isnothing
(
kappa
)
title
(
string
(
L"
$
\kappa_1 =
$
"
,
kappa
[
1
],
L"
$
\kappa_2 =
$
"
,
kappa
[
2
]))
title
(
string
(
L"
$
\kappa_1 =
$
"
,
kappa
[
1
],
L"
$
\kappa_2 =
$
"
,
kappa
[
2
]))
savefig
(
string
(
"mpcac/kappa_1_
$
(kappa[1])_kappa_2_
$
(kappa[2]).png"
)
)
global
filename
=
string
(
"mpcac/kappa_1_
$
(kappa[1])_kappa_2_
$
(kappa[2]).png"
)
end
end
if
!
isnothing
(
mu
)
if
!
isnothing
(
mu
)
title
(
string
(
L"
$
\mu_1 =
$
"
,
mu
[
1
],
L"
$
\mu_2 =
$
"
,
mu
[
2
]))
title
(
string
(
L"
$
\mu_1 =
$
"
,
mu
[
1
],
L"
$
\mu_2 =
$
"
,
mu
[
2
]))
savefig
(
string
(
"mpcac/mu_1_
$
(mu[1])_mu_2_
$
(mu[2]).png"
)
)
global
filename
=
string
(
"mpcac/mu_1_
$
(mu[1])_mu_2_
$
(mu[2]).png"
)
end
end
if
savepl
savefig
(
filename
)
else
display
(
gcf
())
display
(
gcf
())
end
end
end
if
!
data
if
!
data
return
mass
return
mass
else
else
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment