Could you please provide script to perform process described below. Many thanks in advance
1 次查看(过去 30 天)
显示 更早的评论
In the 1.5 million line .txt file (only first 57 lines shown below)
Goal is to delete all columns except column four. Then move this data to the left.
I need to then save this file in .txt format so it can be opened (I.E. fopen) in a future matlab script
Example: The first column needs to look like this when script is performed on it.
0.06247
0.03747
0.03747
0.03747
...and so on
Here's the file
0.000000 0.06259 -0.06223 0.06247 0.99601 0.03158 0.00018 22.10 22.15 0
0.040001 0.03756 -0.04984 0.03747 0.99622 0.03219 0.00018 22.07 22.15 0
0.080000 0.03756 -0.04984 0.03747 0.99562 0.03260 0.00059 22.07 22.15 0
0.120000 0.03756 -0.04984 0.03747 0.99602 0.03239 -0.00002 22.07 22.15 0
0.160000 0.05005 -0.03727 0.03747 0.99581 0.03219 -0.00002 22.07 22.15 0
0.200000 0.05006 -0.04977 0.03748 0.99622 0.03198 0.00018 22.03 22.15 0
0.240000 0.06256 -0.04971 0.03748 0.99643 0.03219 -0.00003 22.10 22.15 0
0.280000 0.06256 -0.04971 0.03748 0.99622 0.03219 0.00038 22.03 22.15 0
0.320000 0.03757 -0.04984 0.04997 0.99643 0.03260 -0.00023 22.10 22.15 0
0.360001 0.06256 -0.04971 0.03748 0.99581 0.03219 -0.00002 22.07 22.15 0
0.400000 0.03757 -0.04984 0.04997 0.99602 0.03260 -0.00023 22.03 22.15 0
0.440000 0.03756 -0.04984 0.03747 0.99582 0.03239 0.00018 22.03 22.15 0
0.480000 0.05007 -0.04978 0.04998 0.99561 0.03219 -0.00002 22.07 22.15 0
0.520000 0.05005 -0.03727 0.03749 0.99602 0.03178 -0.00003 22.10 22.15 0
0.560000 0.05006 -0.04977 0.03748 0.99602 0.03260 0.00018 22.07 22.15 0
0.600000 0.06257 -0.04972 0.04998 0.99622 0.03158 -0.00023 22.07 22.15 0
0.640000 0.06256 -0.04971 0.03748 0.99541 0.03219 -0.00002 22.03 22.15 0
0.680000 0.05007 -0.04978 0.04998 0.99582 0.03239 -0.00002 22.10 22.16 0
0.720000 0.03757 -0.03734 0.04998 0.99601 0.03137 0.00017 22.07 22.16 0
0.760000 0.05007 -0.04978 0.04998 0.99622 0.03178 0.00058 22.07 22.15 0
0.800000 0.05007 -0.04978 0.04998 0.99623 0.03280 0.00059 22.07 22.16 0
0.840000 0.06257 -0.04972 0.04998 0.99622 0.03178 0.00018 22.10 22.16 0
0.880000 0.05007 -0.04978 0.04998 0.99643 0.03219 0.00018 22.07 22.17 0
0.920000 0.05007 -0.04978 0.04998 0.99642 0.03178 0.00017 22.10 22.17 0
0.960001 0.06257 -0.04972 0.04998 0.99622 0.03219 0.00018 22.07 22.17 0
1.000001 0.05007 -0.04978 0.04998 0.99602 0.03219 0.00038 22.07 22.17 0
1.040000 0.05007 -0.04978 0.04998 0.99622 0.03219 0.00038 22.10 22.17 0
1.080000 0.06257 -0.04972 0.04998 0.99581 0.03199 -0.00003 22.07 22.17 0
1.120001 0.03757 -0.04984 0.04997 0.99602 0.03178 0.00018 22.13 22.17 0
1.160000 0.03757 -0.04984 0.04997 0.99643 0.03198 0.00018 22.10 22.17 0
1.200001 0.03756 -0.04984 0.03747 0.99581 0.03198 0.00018 22.07 22.17 0
1.240000 0.03757 -0.04984 0.04997 0.99622 0.03219 -0.00043 22.07 22.17 0
1.280000 0.05007 -0.04978 0.04998 0.99643 0.03239 0.00018 22.07 22.17 0
1.320000 0.06256 -0.04971 0.03748 0.99582 0.03260 0.00018 22.10 22.18 0
1.360000 0.05006 -0.04977 0.03748 0.99622 0.03198 0.00018 22.13 22.18 0
1.400000 0.06256 -0.06221 0.03747 0.99582 0.03239 0.00100 22.07 22.18 0
1.440000 0.05006 -0.04977 0.03748 0.99602 0.03219 0.00018 22.10 22.17 0
1.480001 0.05007 -0.04978 0.04998 0.99581 0.03219 -0.00002 22.17 22.17 0
1.520000 0.06257 -0.04972 0.04998 0.99582 0.03219 0.00099 22.10 22.17 0
1.560000 0.05006 -0.04977 0.03748 0.99602 0.03239 0.00018 22.07 22.17 0
1.600001 0.03756 -0.04984 0.03747 0.99622 0.03198 -0.00003 22.13 22.17 0
1.640000 0.05009 -0.03729 0.06249 0.99581 0.03198 0.00038 22.13 22.17 0
1.680000 0.05007 -0.04978 0.04998 0.99663 0.03239 0.00018 22.10 22.17 0
1.720001 0.05007 -0.04978 0.04998 0.99581 0.03198 0.00018 22.13 22.17 0
1.760000 0.05005 -0.03727 0.03749 0.99602 0.03219 0.00079 22.13 22.17 0
1.800000 0.05007 -0.04978 0.04998 0.99623 0.03260 -0.00002 22.07 22.17 0
1.840000 0.06255 -0.03721 0.03750 0.99561 0.03219 0.00038 22.10 22.17 0
1.880001 0.05007 -0.04978 0.04998 0.99602 0.03260 0.00018 22.13 22.17 0
1.920000 0.06257 -0.03722 0.05000 0.99602 0.03219 0.00018 22.13 22.18 0
1.960000 0.06257 -0.04972 0.04998 0.99622 0.03178 0.00058 22.13 22.18 0
2.000001 0.05007 -0.04978 0.04998 0.99622 0.03219 -0.00023 22.10 22.18 0
2.040000 0.05007 -0.04978 0.04998 0.99663 0.03178 -0.00023 22.17 22.18 0
2.080000 0.05006 -0.04977 0.03748 0.99622 0.03198 0.00038 22.13 22.18 0
2.120000 0.05007 -0.04978 0.04998 0.99602 0.03219 0.00059 22.10 22.18 0
2.160000 0.06256 -0.04971 0.03748 0.99622 0.03239 -0.00023 22.10 22.18 0
2.200000 0.05005 -0.03727 0.03749 0.99602 0.03219 -0.00023 22.07 22.18 0
2.240001 0.05007 -0.04978 0.04998 0.99643 0.03198 0.00038 22.07 22.1
0 个评论
采纳的回答
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!