datastore for a matrix

2 次查看(过去 30 天)
vishnu raghu
vishnu raghu 2020-7-22
回答: Alan Moses 2020-8-12
Hi
i have two matrix a and b each column of and b represents the spectrum . The size of a is 900x150 and size of b is 900x140
i used the following commnads
sld = signalLabelDefinition('Covid');
lssc = labeledSignalSet(raw_COVID,sld)
sld1 = signalLabelDefinition('Healthy');
lssh = labeledSignalSet(raw_Helthy,sld1)
i got the ouput for the same but when i try to combine i get error.
lssmerge = merge(lssc,lssh); merge or combine command gives me error
Error using signalwavelet.internal.labeling.LabeledSignalSetBase/validateCompatibleMembers (line 908)
Unable to merge. Member names must be unique.
Error in labeledSignalSet/merge (line 765)
validateCompatibleMembers(varargin{:});
Can somebody tell me what could be the error?

回答(1 个)

Alan Moses
Alan Moses 2020-8-12
As the error says “Member names must be unique”, you can add the ‘MemberNames’ property in the labeledSignalSet definition and define unique names for both signal sets. You can avoid the error by using the following code:
sld = signalLabelDefinition('Covid');
lssc = labeledSignalSet(raw_COVID,sld,'MemberNames','Member 1');
sld1 = signalLabelDefinition('Healthy');
lssh = labeledSignalSet(raw_Helthy,sld1,'MemberNames','Member 2');
lssmerge = merge(lssc,lssh);
You can use the getSignal function to access the data in the signal sets by indexing into merged signal set.

类别

Help CenterFile Exchange 中查找有关 Particle Swarm 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by