PageRenderTime 50ms CodeModel.GetById 21ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/test-suite/octave/li_std_vector_runme.m

#
MATLAB | 11 lines | 9 code | 2 blank | 0 comment | 2 complexity | bfd87a2e04b85db0a333ecbdbf4995e4 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. li_std_vector
  2. iv = IntVector(4);
  3. for i=0:3,
  4. iv(i) = i;
  5. endfor
  6. x = average(iv);
  7. if (x != 1.5)
  8. error("average failed");
  9. endif