How to find length of a field of an object?

3 views (last 30 days)
C A
C A on 8 Mar 2022
Edited: Matt J on 8 Mar 2022
I have an object that contains signal values. I want to find the length of the signal inbetween two elements in the field called uppFWHMSignal and lowFWHMSignal.
function FWHM(Obj,signal)
StartCellNumber=1;
EndCellNumber=length(Obj.Data);
for CellNr=StartCellNr:EndCellNr
for iFrame=1:length(Obj.CompCellList{CellNr})%ib:id
Obj.Data{CellNr}{iFrame}.([signal,'uppFWHMSignal'])= max(max(Obj.Datat{CellNr}{iFrame}.(signal))/2);
Obj.Data{CellNr}{iFrame}.([signal,'lowFWHMSignal'])= min(max(Obj.Data{CellNr}{iFrame}.(signal))/2);
Obj.Data{CellNr}{iFrame}.([signal,'length'])=length(Obj.Data{CellNr}{iFrame}.(signal)); %length of the signal
end
end
end
Thank you

Answers (0)

Categories

Find more on Software Development Tools in Help Center and File Exchange

Products


Release

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by