MATLAB: Help with single precision floating point arithmetic

conversionfloating pointMATLAB

Hello Can you help me with the single precision floating point arithmetic in matlab I need to generate twiddle factors and obtain the output in the binary format( which is the standard IEEE 754 single precision 32-bit floating point format).Is there any function in MATLAB that will directly convert any value such as sine(pi/4)into the single precision format?
Thanks!

Best Answer

dec2bin(typecast(single(pi),'uint32'),32)