Irregular measurement points and plotting

조회 수: 1 (최근 30일)
Merit
Merit 2014년 6월 11일
댓글: Merit 2014년 6월 11일
Hi all,
Here I have data, which has been measured in irregular points. For example: Vector_1: 1; 3; 8; 9; 17; Vector_2: 95.5; 92.88; 90.4; 89.7; 87.6;
So, first data (95.5) has been measured on day 1, second (92.8) on day 3 and so on. Now I want to plot a simple thing, where x-axis shows all days of the month (1-30) and y-axis shows the data itself (80-100). How can I do this?
Thank you Merit

채택된 답변

Mischa Kim
Mischa Kim 2014년 6월 11일
편집: Mischa Kim 2014년 6월 11일
Merit, you can get started with
data = [1,95.5; 3,92.8; 6,90.4; 12,89.7];
plot(data(:,1),data(:,2),'bd') % plot first col vs. second
xlim([1 30])
ylim([80 100])
  댓글 수: 1
Merit
Merit 2014년 6월 11일
Thank you so much, Mischa for your quick answer! Just what I needed :)

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Annotations에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by