To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016
I have a function f(x) that equals x if x < 1 and x^2 elsewhere.
How would I go about putting all the values of f(x) into another array, named y, for example?
No products are associated with this question.
And to be complete:
y = x.^2; y(x < 1) = x(x < 1);