convert whole code to double

2 views (last 30 days)
D_coder
D_coder on 13 Sep 2018
Answered: Walter Roberson on 13 Sep 2018
is it possible by anyway to convert whole code to double in a single step? For operations such as sparse single format and integer format doesnt work so double format has to be used
  2 Comments
Stephen23
Stephen23 on 13 Sep 2018
Edited: Stephen23 on 13 Sep 2018
"is it possible by anyway to convert whole code to double in a single step?"
No.
What class would expect the output of this to be?:
X = uint8(0)
KSSV
KSSV on 13 Sep 2018
If your input is double then the output and calculations will be in double. Any ways we can help more on knowing the code.

Sign in to comment.

Accepted Answer

Walter Roberson
Walter Roberson on 13 Sep 2018
No, it is not possible, as it would lead to errors because operations are not defined the same way on all of the data types. For example A([true, false]) is not the same as A([1,0])

More Answers (0)

Categories

Find more on Data Type Conversion in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!