当前位置:网站首页>matlab将数字矩阵保存为地理空间数据出错,显示下标索引必须为正整数类型或逻辑类型,解决
matlab将数字矩阵保存为地理空间数据出错,显示下标索引必须为正整数类型或逻辑类型,解决
2022-07-03 00:14:00 【何大虾-热红外定量遥感】
matlab将数字矩阵保存为地理空间数据出错,解决!!!
错误如下:
显示:下标索引必须为正整数类型或逻辑类型(关键是下午6点之前都还能正常运行,吃饭回来之后就报错了)。我反复的检查了我的代码,我的矩阵大小(大小为3678×6067),没有发现错误,我从头到尾都调试了一遍!!晕。。。浪费了一个小时,,然后就尝试了一下,把经纬度直接写进去。代码贴在下面,就这样吧,记录一下,!!!!!
1、报错的代码(之前一直都能用的,搞不懂我动到什么地方了,就一直报错)
lon = [96.99102628183385, 102.441105110587];
lat = [26.80715876614666, 30.11116238113826];
data = flipud(emiss_soil_convert_L9);%%南北朝向进行翻转
% R = georasterref('RasterSize', size(data1),'Latlim', [double(min(lat)) double(max(lat))], 'Lonlim', [double(min(lon)) double(max(lon))]);
geotiffwrite(['C:\Users\HZW\Desktop\FVC\', 'emiss_soil_convert_L9_new.tif'], data, R);
2、能运行的代码(好像也没有改啥,就是把经纬度的范围直接写进去了,就能运行了)
data = flipud(emiss_soil_convert_L9);%%南北朝向进行翻转
R = georasterref('RasterSize', size(data),'Latlim', [26.80715876614666, 30.11116238113826], 'Lonlim', [96.99102628183385, 102.441105110587]);
geotiffwrite(['C:\Users\HZW\Desktop\FVC\', 'emiss_soil_convert_L9_new.tif'], data, R);
!!!!!!!!!!!!!!
就这样吧,知道报错的代码是什么问题的同学,可以给我说一下了,感谢!!
边栏推荐
猜你喜欢
The difference between tail -f, tail -f and tail
2022 list of manufacturers of Chinese 3D vision enterprises (guided positioning and sorting scenes)
Rust ownership (very important)
数学建模之线性规划(含MATLAB代码)
[shutter] image component (load network pictures | load static pictures | load local pictures | path | provider plug-in)
[applet project development -- JD mall] user defined search component of uni app (middle) -- search suggestions
[AUTOSAR I overview]
Two common methods and steps of character device registration
【AutoSAR 十二 模式管理】
瑞萨电子RZ/G2L开发板上手评测
随机推荐
数组与集合性能比较
AEM: Nanlin fan Ben et al. - plant rhizosphere growth promoting bacteria control soybean blight
[applet project development -- JD mall] user defined search component of uni app (middle) -- search suggestions
百度智能云牵头打造智能云综合标准化平台
Web2.0 giants have deployed VC, and tiger Dao VC may become a shortcut to Web3
University of Toronto: Anthony coach | the conditions of deep reinforcement learning can induce dynamic risk measurement
解决ReactNative使用webView存在缓存问题
KingbaseES ALTER TABLE 中 USING 子句的用法
Vulkan practice first bullet
leetcode-241:为运算表达式设计优先级
lex && yacc && bison && flex 配置的問題
University of Oslo: Li Meng | deep reinforcement learning based on swing transformer
1.12 - Instructions
Illustrated network: what is virtual router redundancy protocol VRRP?
The "2022 China Digital Office Market Research Report" can be downloaded to explain the 176.8 billion yuan market in detail
Detailed explanation of pod life cycle
How to find out the currently running version of Solr- How do I find out version of currently running Solr?
[AUTOSAR eight OS]
Advanced pointer (I)
Shell implements basic file operations (SED edit, awk match)