Converting .tif file into an .ascii file

조회 수: 12 (최근 30일)
Ahmed Abdulla
Ahmed Abdulla 2020년 6월 9일
댓글: Ahmed Abdulla 2020년 6월 9일
I have a .tif file that i would like to convert to .ascii . Or a way to be able to convert the .tif file into a numerical matrix where i can convert some values to NaN. I have tried:
Trial 1:
t = Tiff('File_name.tif','r');
imageData = read(t);
imagesc(imageData)
Trial 2:
A = imread('maxlike34_ica_34minerals_step3_2ppd_mostdominant_tiff.tif');
save('myTiff2mat','A');
In both trials when i run a loop to convert any cells that contain a 0 to NaN then none of them change and they all remain as 0, and the .mat files have the dimensions and uint8 which is unlike any data file that i import using .ascii files.
  댓글 수: 4
KSSV
KSSV 2020년 6월 9일
Attach your file.
Ahmed Abdulla
Ahmed Abdulla 2020년 6월 9일
sorry im not allowed to do so, thank you for trying to help! i'll keep trying

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 String Parsing에 대해 자세히 알아보기

제품


릴리스

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by