当前位置:网站首页>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);
!!!!!!!!!!!!!!
就这样吧,知道报错的代码是什么问题的同学,可以给我说一下了,感谢!!
边栏推荐
- 飞凌搭载TI AM62x的ARM核心板/开发板首发上市,亮相Embedded World 2022
- There is an unknown problem in inserting data into the database
- 【AutoSAR 十一 通信相关机制】
- Automated defect analysis in electronic microscopic images
- Nacos+openfeign error reporting solution
- leetcode-224:基本计算器
- Why is the website slow to open?
- 【AutoSAR 四 BSW概述】
- [introduction to AUTOSAR seven tool chain]
- tail -f 、tail -F、tailf的区别
猜你喜欢
Web2.0的巨头纷纷布局VC,Tiger DAO VC或成抵达Web3捷径
Linux Software: how to install redis service
2022中国3D视觉企业(引导定位、分拣场景)厂商名单
使用jenkins之二Job
Vulkan performance and refinement
AttributeError: ‘tuple‘ object has no attribute ‘layer‘问题解决
[AUTOSAR eight OS]
[AUTOSAR I overview]
Liad: the consumer end of micro LED products is first targeted at TVs above 100 inches. At this stage, it is still difficult to enter a smaller size
Win10 多种方式解决无法安装.Net3.5的问题
随机推荐
【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(中)-- 搜索建议
机器学习:numpy版本线性回归预测波士顿房价
【AutoSAR 十一 通信相关机制】
[AUTOSAR nine c/s principle Architecture]
【案例分享】让新时代教育发展与“数”俱进
AttributeError: ‘tuple‘ object has no attribute ‘layer‘问题解决
Liad: the consumer end of micro LED products is first targeted at TVs above 100 inches. At this stage, it is still difficult to enter a smaller size
[daily training] 871 Minimum refueling times
1.11 - bus
[case sharing] let the development of education in the new era advance with "number"
AEM: Nanlin fan Ben et al. - plant rhizosphere growth promoting bacteria control soybean blight
1.12 - 指令
数学建模之线性规划(含MATLAB代码)
2022 list of manufacturers of Chinese 3D vision enterprises (guided positioning and sorting scenes)
leetcode-224:基本计算器
University of Oslo: Li Meng | deep reinforcement learning based on swing transformer
[golang syntax] map common errors golang panic: assignment to entry in nil map
Leetcode-934: the shortest Bridge
【AutoSAR 一 概述】
Problèmes de configuration lex & yacc & Bison & Flex