Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
fcf1f9cd
Commit
fcf1f9cd
authored
Sep 13, 2017
by
Jan-Gerrit Richter
Browse files
fix to display phase correctly if only phase information is given
parent
37b586d9
Changes
1
Hide whitespace changes
Inline
Side-by-side
kernel/ClassStuff/@itaCoordinates/surf.m
View file @
fcf1f9cd
...
...
@@ -81,8 +81,12 @@ else
end
isComplex
=
~
all
(
isreal
(
r
))
||
sArgs
.
complex
;
if
isComplex
% if the radius is complex, set the color
color
=
mod
(
angle
(
r
),
2
*
pi
);
if
sArgs
.
complex
&&
~
isempty
(
sArgs
.
radius
)
color
=
mod
(
data
,
2
*
pi
);
else
% if the radius is complex, set the color
color
=
mod
(
angle
(
r
),
2
*
pi
);
end
colorbar_settings
=
'complex'
;
else
% if it is real, use the magnitude as color
...
...
@@ -92,7 +96,7 @@ else
end
r
=
abs
(
r
);
if
~
isempty
(
sArgs
.
radius
)
if
~
isempty
(
sArgs
.
radius
)
&&
~
sArgs
.
complex
% if a color is given explicitly
% negative radii are set to 0
if
sum
(
abs
(
imag
(
r
)))
>
0
,
ita_verbose_info
(
'ignoring imaginary part of radius'
);
end
...
...
Write
Preview
Supports
Markdown
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