MATLAB中怎么把从外界导入数组,并且要删除其中的英文字符,只保留数据???

数组"$GPGGA,092510.80,3032.7909543,N,11421.4594889,E,5,05,2.4,54.672,M,-14.40,M,00,0000... 数组
"$GPGGA,092510.80,3032.7909543,N,11421.4594889,E,5,05,2.4,54.672,M,-14.40,M,00,0000*47
$GPGGA,092510.90,3032.7909548,N,11421.4594891,E,5,05,2.4,54.672,M,-14.40,M,00,0000*44
$GPGGA,092511.00,3032.7909580,N,11421.4594887,E,5,05,2.4,54.678,M,-14.40,M,01,0000*44
$GPGGA,092511.10,3032.7909572,N,11421.4594891,E,5,05,2.4,54.673,M,-14.40,M,01,0000*44
$GPGGA,092511.20,3032.7909556,N,11421.4594884,E,5,05,2.4,54.673,M,-14.40,M,00,0000*44
$GPGGA,092511.30,3032.7909533,N,11421.4594888,E,5,05,2.4,54.672,M,-14.40,M,00,0000*4B
$GPGGA,092511.40,3032.7909556,N,11421.4594888,E,5,05,2.4,54.670,M,-14.40,M,00,0000*4D
$GPGGA,092511.50,3032.7909540,N,11421.4594883,E,5,05,2.4,54.672,M,-14.40,M,00,0000*42
$GPGGA,092511.60,3032.7909538,N,11421.4594889,E,5,05,2.4,54.675,M,-14.40,M,00,0000*43
$GPGGA,092510.90,3032.7909543,N,11421.4594889,E,5,05,2.4,54.672,M,-14.40,M,00,0000*47
$GPGGA,092511.70,3032.7909528,N,11421.4594882,E,5,05,2.4,54.673,M,-14.40,M,00,0000*4E
$GPGGA,092511.80,3032.7909560,N,11421.4594878,E,5,05,2.4,54.671,M,-14.40,M,00,0000*4A
$GPGGA,092511.90,3032.7909559,N,11421.4594890,E,5,05,2.4,54.673,M,-14.40,M,00,0000*45
$GPGGA,092512.00,3032.7909551,N,11421.4594876,E,5,05,2.4,54.672,M,-14.40,M,01,0000*4F
$GPGGA,092512.80,3032.7909543,N,11421.4594879,E,5,05,2.4,54.673,M,-14.40,M,00,0000*43
$GPGGA,092512.20,3032.7909578,N,11421.4594890,E,5,05,2.4,54.674,M,-14.40,M,00,0000*49
$GPGGA,092512.30,3032.7909577,N,11421.4594892,E,5,05,2.4,54.674,M,-14.40,M,00,0000*45"
从以上数组中选取,最好能做到只有第三列第五列第十列组成的数组。麻烦各位了~~~~~
展开
 我来答
keanelaun
2014-05-14 · TA获得超过167个赞
知道小有建树答主
回答量:148
采纳率:100%
帮助的人:102万
展开全部
将文本复制到txt文本中,注意每一行的格式要相同,将所有的,和,换成辩或销空格键,用全部替换就可以做到,假设以data命名,保存在E盘上,
输入以下程序:
[str1 str2 str3]=textread('E:\data.txt','%*s%*s%f%*s%f%*s%*s%*s%*s%f%*s%*s%*s%*s%*s')
'E:\data.txt'根据自己存放data.txt更改路径,
这样第携游3,5,10列数据就分别保存在str1,str2,str3里面了团塌
如果想要显示长数据,在上面的程序前面加上
format long

>> [str1 str2 str3]
ans =
1.0e+004 *
0.303279095430000 1.142145948890000 0.005467200000000
0.303279095480000 1.142145948910000 0.005467200000000
0.303279095800000 1.142145948870000 0.005467800000000
0.303279095720000 1.142145948910000 0.005467300000000
0.303279095560000 1.142145948840000 0.005467300000000
0.303279095330000 1.142145948880000 0.005467200000000
0.303279095560000 1.142145948880000 0.005467000000000
0.303279095400000 1.142145948830000 0.005467200000000
0.303279095380000 1.142145948890000 0.005467500000000
0.303279095430000 1.142145948890000 0.005467200000000
0.303279095280000 1.142145948820000 0.005467300000000
0.303279095600000 1.142145948780000 0.005467100000000
0.303279095590000 1.142145948900000 0.005467300000000
0.303279095510000 1.142145948760000 0.005467200000000
0.303279095430000 1.142145948790000 0.005467300000000
0.303279095780000 1.142145948900000 0.005467400000000
0.303279095770000 1.142145948920000 0.005467400000000
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式