CHAR AND DOUBLE FUNCTION IN MATLAB

10 views (last 30 days)
Raza
Raza on 1 Oct 2014
Commented: José-Luis on 1 Oct 2014
How to see the function coding in matlab that uses char to convert decimal valuein to respective ascii character and uses double to convert character into respective ascii decimal value

Answers (1)

Guillaume
Guillaume on 1 Oct 2014
You can't, it's a built-in function of matlab, not an m-file. Most likely it's written in C, and the implementation is trivial in C, it's just a cast.
  6 Comments
José-Luis
José-Luis on 1 Oct 2014
Maybe. I did not interpret the OP's original question like that though, so we might be arguing over nothing until he clarifies.
It might be good to clarify, as you sort of did, that char is not really an absolute type, as its size can change depending on the implementation. It is an integer in disguise. If you take it like that, then yes, it is trivial (in application if not in implementation).
If not, then my comment remains valid.

Sign in to comment.

Tags

No tags entered yet.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by