0

我是一个完整的新手 Matlab 用户 - 需要以最简单的方式回答这个问题!我一直在查看帮助文档,但找不到合适的起点。

对于一个项目,我使用激光扫描仪扫描了一个样本,并在单个文本文件中收到了样本的点云,其中包含 x、y 和 z 坐标行(大约 400,000 个点)。我想将此文本文件导入 Matlab,并创建示例模型。

对此的任何帮助将不胜感激!

4

2 回答 2

3

If the textfile just contains the coordinates in rows, you can use the load command.

load filename.txt;
data = filename;

than I would use scatter3 to plot the data.

scatter3( data(:,1) , data(:,2) , data(:,3) );

If the textfile is more complex and it's not convenient to "prepare" it, you can use the suggested filescan command. But I guess it is much slower.

于 2013-09-06T12:28:01.437 回答
0

在不知道文本文件是什么样子的情况下,我不能保证成功,但试试这个:

  1. 在 matlab 中导航到包含该文件的文件夹
  2. 右键单击文件
  3. 选择导入

在这里,您将找到几个用于导入文件的选项。这适用于大多数易于导入的文件。

如果需要,您可以告诉 matlab 为导入生成一个脚本(此导入向导中的复选框),然后您甚至可以以编程方式执行此操作。

于 2013-09-06T13:34:13.803 回答