Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
toolbox
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
12
Issues
12
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
4
Merge Requests
4
Requirements
Requirements
List
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Analytics
Analytics
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Institute of Technical Acoustics (ITA)
toolbox
Commits
f0c65696
Commit
f0c65696
authored
Oct 15, 2016
by
Jan-Gerrit Richter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
changed spherical harmonics surf to work with new surf
parent
2db33dc8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
47 deletions
+25
-47
applications/SphericalHarmonics/@itaSamplingSph/surf.m
applications/SphericalHarmonics/@itaSamplingSph/surf.m
+25
-47
No files found.
applications/SphericalHarmonics/@itaSamplingSph/surf.m
View file @
f0c65696
...
...
@@ -13,60 +13,38 @@ function varargout = surf(this, varargin)
numArgIn
=
nargin
;
titleString
=
[];
% check if SH coefs are given
if
numel
(
varargin
{
1
})
>
0
&&
...
this
.
nPoints
~=
numel
(
varargin
{
1
})
&&
...
numel
(
this
.
Y
)
>
0
&&
...
size
(
this
.
Y
,
1
)
==
this
.
nPoints
uniformPlot
=
0
;
% this is the plot to a uniform sphere
if
numArgIn
==
3
&&
varargin
{
1
}
==
1
tmp
=
varargin
{
2
};
clear
varargin
varargin
{
1
}
=
tmp
;
clear
tmp
uniformPlot
=
1
;
numArgIn
=
2
;
end
if
numArgIn
==
2
% check if SH coefs are given
if
numel
(
varargin
{
1
})
>
0
&&
...
this
.
nPoints
~=
numel
(
varargin
{
1
})
&&
...
numel
(
this
.
Y
)
>
0
&&
...
size
(
this
.
Y
,
1
)
==
this
.
nPoints
ita_verbose_info
(
'This must be SH vector, transforming to spatial domain'
)
ita_verbose_info
(
'This must be SH vector, transforming to spatial domain'
)
% ita_verbose_info('TODO: all results are currenty mirrowed at the x-z axis, I think. Take care!!!',0)
nSHGrid
=
size
(
this
.
Y
,
2
);
nSHData
=
size
(
varargin
{
1
}(:),
1
);
if
nSHGrid
~=
nSHData
nSHGrid
=
size
(
this
.
Y
,
2
);
nSHData
=
size
(
varargin
{
1
}(:),
1
);
if
nSHGrid
~=
nSHData
% error('the spherical harmonics dimensions don''t fit');
% TODO make autofit
if
nSHGrid
>
nSHData
varargin
{
1
}
=
[
varargin
{
1
}(:);
zeros
(
nSHGrid
-
nSHData
,
1
)];
else
ita_verbose_info
(
'Insufficient grid, I cannot plot the full SH spectrum'
,
0
);
end
% TODO make autofit
if
nSHGrid
>
nSHData
varargin
{
1
}
=
[
varargin
{
1
}(:);
zeros
(
nSHGrid
-
nSHData
,
1
)];
else
ita_verbose_info
(
'Insufficient grid, I cannot plot the full SH spectrum'
,
0
);
end
% apply IDSHT:
varargin
{
1
}
=
this
.
Y
*
varargin
{
1
}(:);
if
size
(
this
.
Y
,
2
)
>
1
&&
~
all
(
isreal
(
this
.
Y
(:,
2
)))
&&
all
(
isreal
(
varargin
{
1
}))
% change to complex drawing mode, if complex base is used
varargin
{
1
}(
1
)
=
varargin
{
1
}(
1
)
+
1
i
*
eps
;
end
disp
([
'plotting SH-coefficients up to order '
num2str
(
this
.
nmax
)]);
nmaxVec
=
ceil
(
sqrt
(
nSHData
)
-
1
);
titleString
=
[
'Spherical Harmonics coefficients, nmax = '
num2str
(
nmaxVec
)
'/'
num2str
(
this
.
nmax
)
' (data/grid)'
];
end
% apply IDSHT:
varargin
{
1
}
=
this
.
Y
*
varargin
{
1
}(:);
if
size
(
this
.
Y
,
2
)
>
1
&&
~
all
(
isreal
(
this
.
Y
(:,
2
)))
&&
all
(
isreal
(
varargin
{
1
}))
% change to complex drawing mode, if complex base is used
varargin
{
1
}(
1
)
=
varargin
{
1
}(
1
)
+
1
i
*
eps
;
end
disp
([
'plotting SH-coefficients up to order '
num2str
(
this
.
nmax
)]);
nmaxVec
=
ceil
(
sqrt
(
nSHData
)
-
1
);
titleString
=
[
'Spherical Harmonics coefficients, nmax = '
num2str
(
nmaxVec
)
'/'
num2str
(
this
.
nmax
)
' (data/grid)'
];
end
if
uniformPlot
varargin
{
2
}
=
varargin
{
1
};
varargin
{
1
}
=
1
;
end
hFig
=
{
surf
@
itaCoordinates
(
this
,
varargin
{:})};
...
...
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