当前位置:网站首页>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);
!!!!!!!!!!!!!!
就这样吧,知道报错的代码是什么问题的同学,可以给我说一下了,感谢!!
边栏推荐
- University of Toronto: Anthony coach | the conditions of deep reinforcement learning can induce dynamic risk measurement
- Overlay of shutter (Pop-Up)
- 【AutoSAR 九 C/S原理架构】
- Hdu3507 (slope DP entry)
- [daily training] 871 Minimum refueling times
- 【AutoSAR 十 IO架构】
- 【AutoSAR 四 BSW概述】
- 机器学习:numpy版本线性回归预测波士顿房价
- 数组与集合性能比较
- [introduction to AUTOSAR seven tool chain]
猜你喜欢
飞凌搭载TI AM62x的ARM核心板/开发板首发上市,亮相Embedded World 2022
Rust字符串切片、结构体和枚举类
University of Toronto: Anthony coach | the conditions of deep reinforcement learning can induce dynamic risk measurement
【小程序项目开发-- 京东商城】uni-app之自定义搜索组件(中)-- 搜索建议
Baidu AI Cloud takes the lead in building a comprehensive and standardized platform for smart cloud
【AutoSAR 十二 模式管理】
【AutoSAR 十 IO架构】
Initial order of pointer (basic)
Nacos+openfeign error reporting solution
【AutoSAR 二 AppL概述】
随机推荐
Overlay of shutter (Pop-Up)
File operation io-part2
cordova-plugin-device获取设备信息插件导致华为审核不通过
Vulkan-性能及精细化
Web2.0的巨头纷纷布局VC,Tiger DAO VC或成抵达Web3捷径
【luogu P4320】道路相遇(圆方树)
[case sharing] let the development of education in the new era advance with "number"
leetcode-849:到最近的人的最大距离
Lex & yacc & bison & flex configuration problems
Sentry developer contribution Guide - configure pycharm
Kubernetes resource object introduction and common commands (V) - (NFS & PV & PVC)
Win10 多种方式解决无法安装.Net3.5的问题
RK3568开发板评测篇(二):开发环境搭建
Two common methods and steps of character device registration
全志A40i/T3如何通过SPI转CAN
利亚德:Micro LED 产品消费端首先针对 100 英寸以上电视,现阶段进入更小尺寸还有难度
【AutoSAR 一 概述】
Rust ownership (very important)
antv x6节点拖拽到画布上后的回调事件(踩大坑记录)
Helm basic learning