How to use arguments validation functions for multi-frame images?
Mostrar comentarios más antiguos
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
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Functions en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!