How to plot a large data set in matlab ?

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 :(

답변 (1개)

Muhammad Usman Saleem
Muhammad Usman Saleem 2016년 6월 22일
편집: Muhammad Usman Saleem 2016년 6월 22일

0 개 추천

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

Hojat Sadat
Hojat Sadat 2016년 6월 22일
편집: Hojat Sadat 2016년 6월 22일
My desired result should be like the picture I have uploaded, where there is point for each measurement. I dont know how to make a code for that. I'm not sure that it should be rows vs column or reversed! I want to plot all of the measurements, how can I do that?
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?

댓글을 달려면 로그인하십시오.

카테고리

도움말 센터File Exchange에서 App Building에 대해 자세히 알아보기

태그

질문:

2016년 6월 22일

댓글:

2016년 6월 23일

Community Treasure Hunt

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

Start Hunting!

Translated by