Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
faust
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
Service Desk
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
Admin message
GitLab upgrade completed. Current version is 17.11.4.
Show more breadcrumbs
faust group
faust
Commits
029044a6
Commit
029044a6
authored
5 years ago
by
hhakim
Browse files
Options
Downloads
Patches
Plain Diff
Implement matfaust.Faust.left/right functions as requested by #69.
parent
8794bde5
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
wrapper/matlab/+matfaust/@Faust/Faust.m
+38
-10
38 additions, 10 deletions
wrapper/matlab/+matfaust/@Faust/Faust.m
with
38 additions
and
10 deletions
wrapper/matlab/+matfaust/@Faust/Faust.m
+
38
−
10
View file @
029044a6
...
...
@@ -919,7 +919,7 @@ classdef Faust
%=====================================================================
%> @brief Returns the i-th factor of F.
%> @brief Returns the i-th factor
or a range of factors
of F.
%>
%> @b Usage
%>
...
...
@@ -941,15 +941,6 @@ classdef Faust
%> <p>@b See @b also Faust.numfactors
%=====================================================================
function
factors
=
factors
(
F
,
varargin
)
%% GET_FACT Ith factor of the Faust.
%
% A=factors(F,i) return the i factor A of the Faust F as a full storage matrix.
%
% Example of use :
% A=factors(F,1) returns the 1st factor of the Faust F.
% A=factors(F,4) returns the 4th factor of the Faust F.
%
% See also numfactors.
factors
=
cell
(
1
,
size
(
varargin
{
1
},
2
));
for
j
=
1
:
length
(
factors
)
i
=
varargin
{
1
};
...
...
@@ -977,6 +968,27 @@ classdef Faust
factors
=
factors
{
j
};
end
end
%================================================================
%> Returns the left hand side factors of F from index 1 to i included.
%===
%>
%> <p> @b See @b also Faust.factors, Faust.right
%================================================================
function
lfactors
=
left
(
F
,
i
)
i
=
check_factor_idx
(
F
,
i
);
lfactors
=
factors
(
F
,
1
:
i
);
end
%================================================================
%> Returns the right hand side factors of F from index i to end.
%===
%>
%> <p> @b See @b also Faust.factors, Faust.left
%================================================================
function
rfactors
=
right
(
F
,
i
)
i
=
check_factor_idx
(
F
,
i
);
rfactors
=
factors
(
F
,
i
:
numfactors
(
F
));
end
%=====================================================================
%> @brief DEPRECATED (Use Faust.factors) Returns the i-th factor of F.
...
...
@@ -1916,6 +1928,22 @@ classdef Faust
end
end
methods
(
Access
=
private
)
%================================================================
%> Returns true if i is a valid factor index for the Faust F.
%===
%================================================================
function
i
=
check_factor_idx
(
F
,
i
)
if
(
~
isnumeric
(
i
)
||
~
isscalar
(
i
))
error
(
'i must be a scalar.'
)
end
if
(
i
<=
0
||
i
>
numfactors
(
F
))
error
(
'i is out of range'
)
end
i
=
floor
(
i
);
end
end
methods
(
Static
)
%================================================================
%> Returns true if obj is a Faust object, false otherwise.
...
...
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