getLinearIndependen​tCell(A,ignore_cons​tant_shift)

버전 1.1.0.0 (6.55 KB) 작성자: Dave Stanley
Identifies groups of linearly independent columns in a cell array A
다운로드 수: 33
업데이트 날짜: 2017/8/24

라이선스 보기

[Abasis, Abasisi, Asubs] = getLinearIndependentCell(A,ignore_constant_shift)

Purpose: Takes in a matrix or cell array and identifies a
subset of independent columns. It also clusters subsets of columns
that are dependent upon each other.

Details: If input is a matrix, behavior is exacly the same as
getLinearIndependent. That is, for numeric inputs, "dependence" is
determined based on linear dependence (e.g. If col2 = 2*col1, then col1 and
col2 would be considered dependent. For non-numeric inputs, columns are
automatically considered independent unless they are equivalent (see
examples).

Usage:
[Abasis, Abasisi, Asubs] = getLinearIndependentCell(A)
[Abasis, Abasisi, Asubs] = getLinearIndependentCell(A,ignore_constant_shift)

Inputs:
A: Input matrix or cell array. If a matrix is supplied, behavor is the
same as getLinearIndependent.

Inputs (Optional):
ignore_constant_shift: Flag (true / false [default]) for ignoring a constant term
in determining independence (e.g. if col2 = 10-col1, col1 and col2 will
be grouped together if true; otherwise separately if false).

Outputs:
Abasis: The set of linearly independent basis vectors in A

Abasisi: Index locations of original basis vectors in A, such
that Abasis = A(:,Abasisi).

Asub: Cell array with one element for each basis vector in A. Each cell
in Asub identifies clusters of columns in the original matrix A that
share linear dependence.

% Example:

A = {'a','b','c';'a','b','c';'d','e','f';1,2,3;1,2,5;5,3,@plot;5,3,@plot;2,4,6}';

% A =
% 'a' 'a' 'd' [1] [1] [ 5] [ 5] [2]
% 'b' 'b' 'e' [2] [2] [ 3] [ 3] [4]
% 'c' 'c' 'f' [3] [5] @plot @plot [6]

[Abasis, Abasisi, Asubs] = getLinearIndependentCell(A)

% Results:
%
% % % % % % % % % Abasis - the subset of basis columns % % % % % % % % %
%
% horzcat(Abasis{:})
% 3x5 cell array
% [1] [1] 'a' 'd' [ 5]
% [2] [2] 'b' 'e' [ 3]
% [3] [5] 'c' 'f' @plot
%
% % % % Abasisi - the indices of these columns in the original matrix % % %
%
% Abasisi =
% 1x5 cell array
% [4] [5] [1] [3] [6]
%
% % % % % % % % % Asubs - subsets ofl linearly dependent columns % % % % % % % % %
%
% Asubs =
% 1x5 cell array
% [1x2 double] [5] [1x2 double] [3] [1x2 double]
% Asubs{1} : [4, 8]
% Asubs{2} : [5]
% Asubs{3} : [1, 2]
% Asubs{4} : [3]
% Asubs{5} : [6, 7]

Submodules: getLinearIndependent, uniqueCellGeneralized, iscellnum

Author: David Stanley, Boston University, 2017

See also: getLinearIndependent, rref, unique

인용 양식

Dave Stanley (2024). getLinearIndependentCell(A,ignore_constant_shift) (https://www.mathworks.com/matlabcentral/fileexchange/64222-getlinearindependentcell-a-ignore_constant_shift), MATLAB Central File Exchange. 검색 날짜: .

MATLAB 릴리스 호환 정보
개발 환경: R2013a
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Electrophysiology에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

Updated description and zip file structure

1.0.0.0