Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
SPINS_main
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Donovan Allum
SPINS_main
Commits
d2631e0f
Commit
d2631e0f
authored
11 years ago
by
Christopher Subich
Browse files
Options
Downloads
Patches
Plain Diff
Renamed my_nice_contour to spins_contour for namespace consistency
parent
d2454796
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
matlab/spins_contour.m
+13
-9
13 additions, 9 deletions
matlab/spins_contour.m
with
13 additions
and
9 deletions
matlab/
my_nice
_contour.m
→
matlab/
spins
_contour.m
+
13
−
9
View file @
d2631e0f
function
[
h
xout
yout
]
=
my_nice
_contour
(
x
,
y
,
z
,
n
);
function
[
h
xout
yout
]
=
spins
_contour
(
x
,
y
,
z
,
n
);
% my_nice_contour -- creates a contour plot using line objects
%
% syntax: [handle x_out y_out] = my_nice_contour(x,y,z,n)
...
...
@@ -19,6 +19,10 @@ function [h xout yout] = my_nice_contour(x,y,z,n);
xx
=
x
;
yy
=
y
;
% The matlab function "contours" ends up doing the number-crunching
% work for us to find the contours. Its return value is a matrix
% consisting of countour levels and the (x,y) points along those
% levels, which we can then feed to "line" for plotting.
cmat
=
contours
(
xx
,
yy
,
z
,
n
);
ind
=
1
;
...
...
@@ -26,11 +30,11 @@ h = [];
xout
=
{};
yout
=
{};
while
(
ind
<
size
(
cmat
,
2
))
len
=
cmat
(
2
,
ind
);
xs
=
cmat
(
1
,
ind
+
(
1
:
len
));
xout
{
ind
}
=
xs
;
ys
=
cmat
(
2
,
ind
+
(
1
:
len
));
yout
{
ind
}
=
ys
;
h
(
end
+
1
)
=
line
(
xs
,
ys
);
ind
=
ind
+
len
+
1
;
end
\ No newline at end of file
len
=
cmat
(
2
,
ind
);
xs
=
cmat
(
1
,
ind
+
(
1
:
len
));
xout
{
ind
}
=
xs
;
ys
=
cmat
(
2
,
ind
+
(
1
:
len
));
yout
{
ind
}
=
ys
;
h
(
end
+
1
)
=
line
(
xs
,
ys
);
ind
=
ind
+
len
+
1
;
end
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