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

gcc - MinGW's ld cannot perform PE operations on non PE output file -

timeout - Handshake_timeout on RabbitMQ using python and pika from remote vm -

c# - Search and Add Comment with OpenXML for Word -