1

I'm trying to write some code which, depending on user, might be run in Matlab or Octave.

One of the key things is the output of a video (using VideoWriter) in Matlab.

This apparently isn't supported in Octave, but I'd still like to be able to modify the final image in Octave.

Is there a quick way to determine whether a .m is being run in Matlab vs Octave? Is there a quick way to flag one or the other?

Matthew
  • 51
  • 6
  • 2
    I would use exist('VideoWriter') command, in that way your code would automatically use VideoWriter in Octave when its implemented. – VolkanOzcan Nov 05 '18 at 07:10
  • 1
    and, btw, there is the "old" video interface in GNU Octave: https://wiki.octave.org/Video_package – Andy Nov 05 '18 at 14:41
  • https://octave.org/doc/interpreter/How-to-Distinguish-Between-Octave-and-Matlab.html#How-to-Distinguish-Between-Octave-and-Matlab – Tasos Papastylianou Nov 05 '18 at 15:27

0 Answers0