필터 지우기
필터 지우기

Convert single data to double

조회 수: 411 (최근 30일)
Wendy Cameron
Wendy Cameron 2020년 12월 3일
댓글: Wendy Cameron 2020년 12월 3일
I have downloaded an nc weather data file and from this have downloaded the variables I need. The temperature variable has come out as a 1 x 1 x 14976 "single" and the time as a 1 x 14976 double. I am wondering how I can extract just the actual temperature data from the "single" so I can make a table with the time and temperature in corresponding rows.

채택된 답변

Stephan
Stephan 2020년 12월 3일
편집: Stephan 2020년 12월 3일
You might want to use squeeze and double. After that you can concatenate the data to an array or a table.
  댓글 수: 1
Wendy Cameron
Wendy Cameron 2020년 12월 3일
Thanks Stephan - I am a bit of a novice at matlab
I did
A = squeeze(MaxTemp);
and got a 14976 x 1 single
then B = double(A); and got the 14976 x 1 double.
It worked - I am so excited! Thank you for your speedy help.
Wendy

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by