datastore for a matrix

2 views (last 30 days)
vishnu raghu
vishnu raghu on 22 Jul 2020
Answered: Alan Moses on 12 Aug 2020
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?

Answers (1)

Alan Moses
Alan Moses on 12 Aug 2020
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.

Tags

Community Treasure Hunt

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

Start Hunting!