声振论坛

 找回密码
 我要加入

QQ登录

只需一步,快速开始

查看: 814|回复: 2

[编程技巧] 提取数据

[复制链接]
发表于 2006-10-24 18:08 | 显示全部楼层 |阅读模式

马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。

您需要 登录 才可以下载或查看,没有账号?我要加入

x
问一个问题:
50, 5000, 0.900000, 0.900000, 1, 28563.000000
50, 5000, 0.900000, 0.900000, 2, 26643.000000
50, 5000, 0.900000, 0.900000, 3, 24936.000000
50, 5000, 0.900000, 0.900000, 4, 28075.000000
50, 5000, 0.900000, 0.900000, 5, 27230.000000
50, 5000, 0.900000, 0.900000, 6, 25593.000000
50, 5000, 0.900000, 0.900000, 7, 29172.000000
50, 5000, 0.900000, 0.900000, 8, 26323.000000
50, 5000, 0.900000, 0.900000, 9, 29076.000000
50, 5000, 0.900000, 0.900000, 10, 25369.000000
50, 5000, 0.900000, 0.900000, 11, 27418.000000
50, 5000, 0.900000, 0.900000, 12, 25061.000000
50, 5000, 0.900000, 0.900000, 13, 25019.000000
50, 5000, 0.900000, 0.900000, 14, 29815.000000
50, 5000, 0.900000, 0.900000, 15, 28767.000000
50, 5000, 0.900000, 0.900000, 16, 25798.000000
50, 5000, 0.900000, 0.900000, 17, 27080.000000
50, 5000, 0.900000, 0.900000, 18, 29368.000000
50, 5000, 0.900000, 0.900000, 19, 27811.000000
50, 5000, 0.900000, 0.900000, 20, 23566.000000
50, 5000, 0.900000, 0.900000, 21, 26377.000000
50, 5000, 0.900000, 0.900000, 22, 28076.000000
50, 5000, 0.900000, 0.900000, 23, 26549.000000
50, 5000, 0.900000, 0.900000, 24, 26080.000000
50, 5000, 0.900000, 0.900000, 25, 27876.000000
50, 5000, 0.900000, 0.900000, 26, 27639.000000
50, 5000, 0.900000, 0.900000, 27, 28000.000000
50, 5000, 0.900000, 0.900000, 28, 29314.000000
50, 5000, 0.900000, 0.900000, 29, 25852.000000
50, 5000, 0.900000, 0.900000, 30, 27838.000000
50, 5000, 0.900000, 0.850000, 1, 22666.000000
50, 5000, 0.900000, 0.850000, 2, 27413.000000
50, 5000, 0.900000, 0.850000, 3, 28091.000000
50, 5000, 0.900000, 0.850000, 4, 27359.000000
50, 5000, 0.900000, 0.850000, 5, 27745.000000
50, 5000, 0.900000, 0.850000, 6, 26735.000000
50, 5000, 0.900000, 0.850000, 7, 32693.000000
50, 5000, 0.900000, 0.850000, 8, 25801.000000
50, 5000, 0.900000, 0.850000, 9, 25196.000000
50, 5000, 0.900000, 0.850000, 10, 25838.000000
50, 5000, 0.900000, 0.850000, 11, 26182.000000
50, 5000, 0.900000, 0.850000, 12, 26950.000000
50, 5000, 0.900000, 0.850000, 13, 26997.000000
50, 5000, 0.900000, 0.850000, 14, 26680.000000
50, 5000, 0.900000, 0.850000, 15, 24401.000000
50, 5000, 0.900000, 0.850000, 16, 27971.000000
50, 5000, 0.900000, 0.850000, 17, 24406.000000
50, 5000, 0.900000, 0.850000, 18, 31904.000000
50, 5000, 0.900000, 0.850000, 19, 23533.000000
50, 5000, 0.900000, 0.850000, 20, 24052.000000
50, 5000, 0.900000, 0.850000, 21, 28638.000000
50, 5000, 0.900000, 0.850000, 22, 26029.000000
50, 5000, 0.900000, 0.850000, 23, 29153.000000
50, 5000, 0.900000, 0.850000, 24, 26642.000000
50, 5000, 0.900000, 0.850000, 25, 26967.000000
50, 5000, 0.900000, 0.850000, 26, 28654.000000
50, 5000, 0.900000, 0.850000, 27, 25961.000000
50, 5000, 0.900000, 0.850000, 28, 27873.000000
50, 5000, 0.900000, 0.850000, 29, 28229.000000
50, 5000, 0.900000, 0.850000, 30, 23464.000000
有一连串这样的数据,请问怎样编程提取出最后一列的数据??
回复
分享到:

使用道具 举报

发表于 2006-10-24 18:23 | 显示全部楼层
假设矩阵名为x
则x(:,6)即为最后一列数据

评分

1

查看全部评分

发表于 2006-10-24 18:23 | 显示全部楼层
1.将数据存为一个txt文件,如aaaa.txt,
2.file ->import data 导入数据,结果为一个60*6的数组aaaa
3.在命令窗口输入>> p=aaaa(:,6);

评分

1

查看全部评分

您需要登录后才可以回帖 登录 | 我要加入

本版积分规则

QQ|小黑屋|Archiver|手机版|联系我们|声振论坛

GMT+8, 2024-11-19 22:49 , Processed in 0.056108 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表