Create vector from a number range


#1

Operating System: Mac
Interface Version: cmdstan-2.17.1
Compiler/Toolkit: g++

Hi, is there a built-in function in stan for creating a vector/array where you specify the minimum, maximum, and number of elements? I’m trying to achieve something similar to MATLAB’s linspace, or Python’s range functions.

Thank you
Peter


#2

Only for consecutive integers (with the : operator) and you cannot yet assign it to a symbol.


#3

Nope, but I created a stan-dev/math issue.

This is slightly different than the one Ben mentioned.