|
Hello Stefan,
There is no public interface for the fi object in hand-written mex files.
However, you can compile a MATLAB function into a mex function with fi
inputs and outputs using emlmex.
If you want to use handwritten mex files, then use builtin integer
inputs and outputs, and cast to and from fi objects outside of the mex
function.
Let me know if you need more details.
Best wishes,
Tom Bryan
tom.bryan@mathworks.com
Stefan Jakobs wrote:
> Hello,
>
> I'm converting a double value to a fix point value and then pass that value to a mex file. The return type of the mex file is double, but the actual value is of type fix point.
> So, how can I make matlab to recognise the double value as a fix point value?
>
> example (fix_point is the mex file):
>
> a = fix_point(fi(-1.5, true, 4, 2))
> class(a)
> ans = double
> a
> ans = 2.1220e-314
>
> But that is the wrong value, because 'a' should be interpreted as type fi.
>
> Thanks for your help.
> Greetings
> Stefan
|