필터 지우기
필터 지우기

convert whole code to double

조회 수: 1 (최근 30일)
D_coder
D_coder 2018년 9월 13일
답변: Walter Roberson 2018년 9월 13일
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
Stephen23
Stephen23 2018년 9월 13일
편집: Stephen23 2018년 9월 13일
"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 2018년 9월 13일
If your input is double then the output and calculations will be in double. Any ways we can help more on knowing the code.

댓글을 달려면 로그인하십시오.

채택된 답변

Walter Roberson
Walter Roberson 2018년 9월 13일
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])

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Conversion에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by