MATLAB: Write a function in single precision

-

Hi, I have a function that takes as input 2 vectors and gives as output a third vector "x" that I want in single precision. But I want the whole function to work in single precision not only the final answer so I can't use x=single(x). How can I do that? Thank you.

Best Answer

Just cast the input vectors to single as soon as they come in.
Related Question