From: Erik on
I'm receiving serial inputs to a simulink model in the format ASCII-characters (in dec). For example, I'm receiving 49 46 53 which corresponds to the number 1.5.
Which is the easiiest way to convert 49 46 53 to a 1.5 (double) to be used in the Simulink model?

The Matlab-command native2unicode performs the conversion but I can't use this command in an Embedded Matlab function and build my model to a platform (in my case a dSpace microautobox). Is there a simulink model block which performs this operation?

Thank you,
Erik
From: Erik on
Anyone got a hint about this one?


"Erik " <erik.jonasson(a)consultant.volvo.com> wrote in message <hq71h2$kua$1(a)fred.mathworks.com>...
> I'm receiving serial inputs to a simulink model in the format ASCII-characters (in dec). For example, I'm receiving 49 46 53 which corresponds to the number 1.5.
> Which is the easiiest way to convert 49 46 53 to a 1.5 (double) to be used in the Simulink model?
>
> The Matlab-command native2unicode performs the conversion but I can't use this command in an Embedded Matlab function and build my model to a platform (in my case a dSpace microautobox). Is there a simulink model block which performs this operation?
>
> Thank you,
> Erik