I get a variable / argument undefined when I try to define my own random generator function.
the code:
function result = myrand(n, t, p, d)
a = 200 * t + p
big_rand = a * n
result = big_rand / 10**d
return;
endfunction
mrand = myrand(5379, 0, 91, 4)
Error:
>> myrand
error: 't' undefined near line 2 column 15
error: called from
myrand at line 2 column 7
source
share