Questions tagged [octave]

This challenge is related to the Octave language. Note that challenges that require the answers to be in a specific language are generally discouraged.

Filter by
Sorted by
Tagged with
6 votes
4 answers

Generate Matlab plot markers

Matlab has a useful command for visualizing data: plot. It draws data points using "markers" in 2-D space, connecting them with lines; however, for this challenge, ...
  • 12.8k
12 votes
1 answer

What's the shortest way to define an anonymous recursive function in Octave?

I love functional programming in Octave, but it's rather unwieldy in practice. I'm wondering about the shortest way to define an anonymous recursive function. I have some ideas, but I'm wondering if ...
  • 9,366
15 votes
3 answers

How to swap elements in a vector using an anonymous function in Octave?

Swapping two elements in a vector/matrix is very simple in Octave: x='abcde'; x([4,1])=x([1,4]) x = dbcae Unfortunately, I have yet to find a way to do this ...
18 votes
11 answers

Tips for golfing in Octave

What general tips do you have for golfing in Octave? I'm looking for ideas that can be applied to code golf problems in general that are at least somewhat specific to Octave (e.g. "remove comments" is ...
  • 937