octave - suppressing printing every assignment -
i have written simple script in octave. when run command line, octave prints line every time variable gets assigned new value. how suppress that?
mwe:
function result = stuff() result = 0 i=0:10, j += end end
when run it:
octave:17> stuff() result = 0 result = 0 result = 1 result = 3 result = 6 result = 10 result = 15 result = 21 result = 28 result = 36 result = 45 result = 55 ans = 55 octave:18>
i want rid of result = ...
lines. new octave, please forgive me asking such basic question.
by adding semicolon @ end of statement suppress intermediate result.
in case:
function result = stuff() result = 0; i=0:10, j += i; end end
will trick.
Comments
Post a Comment