FAQ: Difference between revisions

576 bytes added ,  27 March 2016
→‎What features are unique to Octave?: Add broadcasting information
(→‎What features are unique to Octave?: Add broadcasting information)
Line 456: Line 456:
     x += 1;
     x += 1;
   until (x == 10)
   until (x == 10)
===Broadcasting===
Borrowed from [http://stackoverflow.com/q/26948776/3565696 other languages], [http://www.gnu.org/software/octave/doc/v4.0.1/Broadcasting.html octave broadcasting] allows easy and readable vectorialization.
  f = (1:0.1:2);
  # put angular frequencies on the first dimension to prepare broadcasting
  omega = 2 * pi * f(:);
  # time is already on the second dimension (row vector)
  t = 0:0.02:2;
  # the resulting s will be a 2-dimensional array
  s = sin(omega .* t);
  # which can be displayed as
  pcolor(t, f, s)
  xlabel("t (s)")
  ylabel("f (Hz)")


==How does Octave solve linear systems?==
==How does Octave solve linear systems?==
32

edits