How to use arguments validation functions for multi-frame images?
Ältere Kommentare anzeigen
Hi, I am designing a function to analyse an image sequence frame by frame to return a vector of time according to the cardiac cycle. For the image file argument validation, how do I customise a validation function for these two purposes:
1) ensure each sequence have a reasonable duration (number of frames, minimum 75 frames in total) 2) must be a 3D array
Thanks in advance!
function peaktimes = detectCardiacPhase(img, frameRate)
arguments
img (:,:,:) {mustBeNumeric}
frameRate double {mustBePositive} = 15 %default value of frameRate is 15 frames/sec
end
end
Akzeptierte Antwort
Weitere Antworten (0)
Kategorien
Mehr zu Functions finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!