Filter löschen
Filter löschen

convert whole code to double

1 Ansicht (letzte 30 Tage)
D_coder
D_coder am 13 Sep. 2018
Beantwortet: Walter Roberson am 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 Kommentare
Stephen23
Stephen23 am 13 Sep. 2018
Bearbeitet: Stephen23 am 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 am 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.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

Walter Roberson
Walter Roberson am 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])

Weitere Antworten (0)

Kategorien

Mehr zu Data Type Conversion finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by