MATLAB - Working with multiple multiple elements : 'Simple' question. 

Say I had y=sin(x) where **x is made up of multiple elements** say x=(1:1:5). Now my question: how do I **solve for all elements** in a variable z where all I know is z=cos(y)? 

Using just MATLAB code, please no algebraic manipulation.

Thanks!