Skip to content

if script include a function, will throw out error #17

@zj2050

Description

@zj2050

Hi,all:
I have defined a function in script, like:
disp("Running...") 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)

the script can correct execute in octave, but when call:
octave.Execute(script)
will show error : "error: 'myrand' undefined near line 1, column 9\r\n"

how defined a function in script? thanks

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions