How to remove the error 'the combination of fixed point and floating point is not supported'?
3 views (last 30 days)
Show older comments
priya agarwal
on 20 Jan 2014
Answered: Walter Roberson
on 20 Jan 2014
I want to convert matlab function to vhdl.
the function is mod.
During fixed point conversion it gives the above error with a redmark on the bold words in following line:
y = fi( mod( u, 2*pi ), 0, 14, 23, fm);
how to remove this error?
0 Comments
Accepted Answer
Walter Roberson
on 20 Jan 2014
My guess is that "u" is fixed point type. pi is a floating point type, and you probably cannot use mod() of a fixed point value with respect to a floating point value.
The fix, if I am right:
TwoPi = fi(2*Pi, 0, 14, 23, fm);
y = mod(u, TwoPi);
0 Comments
More Answers (0)
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!