function - How to define array as parameter in MatLab? -


this question has answer here:

i have function:

function recon_mm(lvl, threshold, filetocompress) 

i make threshold array. checked matlab documentation find no clear example how state threshold array,

matlab not statically typed , not have syntax type annotations, can check if parameter scalar , return early.

if isscalar(threshold)     error('parameter ''threshold'' must array')     return end 

note catch 1x1 arrays, e.g. isscalar([1]) == true.


Comments

Popular posts from this blog

powershell Start-Process exit code -1073741502 when used with Credential from a windows service environment -

twig - Using Twigbridge in a Laravel 5.1 Package -

c# - LINQ join Entities from HashSet's, Join vs Dictionary vs HashSet performance -