How to plot a large data set in matlab ?

300 visualizaciones (últimos 30 días)
Hojat Sadat
Hojat Sadat el 22 de Jun. de 2016
Comentada: Muhammad Usman Saleem el 23 de Jun. de 2016
I have a scv file from a laser scan measurement that I want to plot each measurement as point in matlab. I have tried this simple code but it does not make since.
close all;
data=csvread('laserscan.csv');
x=data(:,1);
y=data(:,2);
plot(x,y);
xlabel('X coordinates');
ylabel('Y coordinates');
title('laser scan');
I want the plot like this!
It will be great to get help because I need it in my report very soon :(

Respuestas (1)

Muhammad Usman Saleem
Muhammad Usman Saleem el 22 de Jun. de 2016
Editada: Muhammad Usman Saleem el 22 de Jun. de 2016
What do you want to plot with this data?
You code is reading first two columns of your csv file then make a simple plot of them. Are you want every 1 column plot with 2 , 3 with 4 soon on???
Your values in first two column are nearly same, you have to adjust limits. That why i got straight line. Here i got results for 1st column vs 2nd column
  3 comentarios
Muhammad Usman Saleem
Muhammad Usman Saleem el 22 de Jun. de 2016
your code description is as fellow
data=csvread('laserscan.csv'); % reading csv file
x=data(:,1); % reading its first column
y=data(:,2); % reading its second column of csv file
plot(x,y); ploting first colu vs secon
I still do not know what you want? In ploting there is some x and y tell me what will be this in your case?

Iniciar sesión para comentar.

Categorías

Más información sobre 2-D and 3-D Plots en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by