I want to convert a single cell to a float number
    조회 수: 16 (최근 30일)
  
       이전 댓글 표시
    
i have a cell
celltest = {23.234,123.45};
And I want to convert the first number to float
something like this:
cell2float(celltest(1))
댓글 수: 0
답변 (3개)
  the cyclist
      
      
 2022년 4월 3일
        I'm confused. The way you have defined celltest, the first element is already a (double-precision) floating-point number:
celltest = {23.234,123.45};
class(celltest{1})
  KSSV
      
      
 2022년 4월 3일
        celltest = {23.234,123.45}; 
class(celltest{1})
If it is double, nothing need to be done. If it is a string, read about str2num, str2double. 
댓글 수: 0
참고 항목
카테고리
				Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
			
	Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!



