How to make algorithm using raster file?
조회 수: 1 (최근 30일)
이전 댓글 표시
Hello every one, I have a problem regarding raster file in Matlab. My task is import the raster file about temperature to Matlab, then create a formula to calculate a parameter using data from that temperature raster file. Could you explain me how to import raster file and write the formular? The formula is in below, all of data are constant, I just need to put GDDakt (the value of temperature raster file) in. Thank you a lot.

댓글 수: 3
Image Analyst
2020년 7월 9일
What do you mean by raster? To me, I only think of it in regards to an image, like the image is produced by a raster scan where the electron beam goes from left to right and top to bottom. Do you simply mean that GDD is a matrix? If so, the "raster" adjective is not even needed - it just confuses things.
채택된 답변
KSSV
2020년 7월 9일
To load the data read about load, importdata, textscan.
If your raster data matrix is A, to get your formula use:
GDDmax = max(A(:)) ; % this gives max of A
GDDmin = min(A(:)) ; % this gives min of A
E = 4*(GDDmax-A).*(A-GDDmin)/(GDDmax-GDDmin)^2 ;
추가 답변 (1개)
Image Analyst
2020년 7월 9일
Since you say your GDD data is in a TIFF file, you can try to use imread() to read in the tif image. If that doesn't work, there is a TIFF class with more functionality.
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

