BUNPC / Homer3

MATLAB application for fNIRS data processing and visualization
93 stars 55 forks source link

[BUG]: wrong output size for GetMeasList when more than one condition is present #202

Open anaflom opened 7 months ago

anaflom commented 7 months ago

Version of Homer3 you are using

Homer3-1.80.2

Your environment (MATLAB environment and OS)

MATLAB R2024a; Windows 11 Pro 64-bit 23H2

Description of the issue

When applying the function ml = GetMeasList(obj, options) to a DataClass containing more than 1 condition the output has one extra row.

Steps to reproduce: mlAct = dcAvg.GetMeasList(); Where dcAvg is a data cass containing more than 1 condition

This is because it enters into the if the statement of line 373 (if obj.measurementList(ii).GetCondition()>1), and the loop breaks, but ii has already been updated and then the unused rows are removed doing ml(ii+1:end,:) = [];