matlab Is there something like list comprehension as it is in python?
I am looking for something like list comprehensions in matlab however I couldnt find anything like this in the documentary.
In python it would be something like
A=[i/50 for i in range(50)]
Matlab is very fond of 'vectorizing'. You would write your example as:
A = (0:49) ./ 50
Matlab hates loops and therefore list comprehension. That said, take a look at the arrayfun function.