Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Virtual Sensing
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
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
SPAH
IN-NOVA
Virtual Sensing
Commits
ace9b679
Commit
ace9b679
authored
Sep 29, 2024
by
Achilles Kappis
Browse files
Options
Downloads
Patches
Plain Diff
Update arrMan.m to accept and use column position vectors and column directional vectors
parent
a948e596
No related branches found
No related tags found
1 merge request
!8
Convert project to use column vectors
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
Signal Processing/Array Processing/MATLAB/Functions/arrMan.m
+8
-8
8 additions, 8 deletions
Signal Processing/Array Processing/MATLAB/Functions/arrMan.m
with
8 additions
and
8 deletions
Signal Processing/Array Processing/MATLAB/Functions/arrMan.m
+
8
−
8
View file @
ace9b679
...
...
@@ -3,7 +3,7 @@
% Author: Achilles Kappis
% e-mail: axilleaz@protonmail.com
%
% Date: 2
8
/0
5
/2024 (DD/MM/YYYY)
% Date: 2
9
/0
9
/2024 (DD/MM/YYYY)
%
% Copyright: MIT
% --------------------------------------------------
...
...
@@ -13,12 +13,12 @@
% Input
%
% mPos [numeric]: The positions of the sensors in Cartesian coordinates.
% This must be an
Mx3
matrix where M denotes the number of
% This must be an
3xM
matrix where M denotes the number of
% sensors and for each sensor the coordinates are in
% [x
,
y
,
z] format.
% [x
;
y
;
z] format.
%
% dirs [numeric]: These are the directions for which the array manifold
% will be calculated. This must be an
Nx2
matrix where N is
% will be calculated. This must be an
2xN
matrix where N is
% the number of directions and for each direction the
% azimuth and elevation/inclination is given. The values
% must be provided in radians. The directions must be
...
...
@@ -53,18 +53,18 @@ function am = arrMan(mPos, dirs, k)
% Validate input arguments
% ====================================================
% Validate mandatory arguments
validateattributes
(
mPos
,
"numeric"
,
{
'2d'
,
'finite'
,
'nonnan'
,
'nonempty'
,
'real'
,
'n
col
s'
,
3
},
mfilename
,
"Position of sensors"
,
1
);
validateattributes
(
dirs
,
"numeric"
,
{
'2d'
,
'finite'
,
'nonnan'
,
'nonempty'
,
'real'
,
'n
col
s'
,
2
},
mfilename
,
"Directions of interest"
,
2
);
validateattributes
(
mPos
,
"numeric"
,
{
'2d'
,
'finite'
,
'nonnan'
,
'nonempty'
,
'real'
,
'n
row
s'
,
3
},
mfilename
,
"Position of sensors"
,
1
);
validateattributes
(
dirs
,
"numeric"
,
{
'2d'
,
'finite'
,
'nonnan'
,
'nonempty'
,
'real'
,
'n
row
s'
,
2
},
mfilename
,
"Directions of interest"
,
2
);
validateattributes
(
k
,
"numeric"
,
{
'vector'
,
'finite'
,
'nonnan'
,
'nonempty'
,
'nonnegative'
,
'real'
},
mfilename
,
"Wavenumbers of interest"
,
3
);
% =============================================
% Calculate the array manifold
% =============================================
% Get Cartesian coordinates of directions
[
x
,
y
,
z
]
=
sph2cart
(
dirs
(
:
,
1
),
dirs
(
:
,
2
),
ones
(
size
(
dirs
(
:
,
1
))));
[
x
,
y
,
z
]
=
sph2cart
(
dirs
(
1
,
:
),
dirs
(
2
,
:
),
ones
(
size
(
dirs
(
1
,
:
))));
% Inner product of directions and sensor position
am
=
mPos
*
[
x
,
y
,
z
]
.'
;
am
=
[
x
;
y
;
z
]
*
mPos
;
% Multiply with wavenumbers
am
=
am
.*
permute
(
k
(:),
[
3
,
2
,
1
]);
...
...
...
...
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