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
5
votes
3answers
263 views

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
votes
1answer
273 views

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 ...
15
votes
3answers
1k views

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
10answers
1k views

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 ...