Read variables and draw notepad txt file on Matlab

There is a pointcloud.txt and it consist of 123 row and 3 coloumn.(Id x y) Firstly I imported to workspace but i can not draw it.how can I do it.

 Risposta accettata

Note that you can use pcshow() with an N x 3 matrix of coordinates.
You do not appear to have any z coordinates, so I have to wonder whether you really have a pointcloud. Perhaps you should scatter(x(:), y(:)) ?

6 Commenti

I share my text file in down :)
num = xlsread('pointcloud.t t');
xyz = num(:, 2:4);
pcshow(xyz)
Or
scatter3(xyz(:, 1),xyz(:,2),xyz(:,3))
Tayfun Çelebi
Tayfun Çelebi il 14 Mar 2017
Modificato: Tayfun Çelebi il 14 Mar 2017
Thank you so much :) if your answer is true accept your comment.now i dont have a computer :)
num = xlsread('pointcloud.t t'); When i write this,Matlab give this error. File C:\Users\tayfun96\Documents\MATLAB\cloud.txt not in Microsoft Excel Format.
num = csvread('pointcloud (1).txt', 1, 0);
xyz = num(:, 2:4);
scatter3(xyz(:, 1),xyz(:,2),xyz(:,3))
Thank you,this solved it

Accedi per commentare.

Categorie

Scopri di più su App Building in Centro assistenza e File Exchange

Tag

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by