Showing posts with label matlab. Show all posts
Showing posts with label matlab. Show all posts

Thursday, December 20, 2012

Quick Start: Graph with Matlab

Prepare data in file ttidata.m

1 157 1851 (separated by TAB)
2 203 1864
3 250 1866
4 281 1869
5 313 2187
6 344 2713
7 359 2716
8 375 2942
9 406 3039
10 453 3301

Draw (x, y) and (x, z) graphs on the same canvas

load ttidata.m
y = ttidata(:,2);
z = ttidata(:,3);
plot([1:length(y)],y,'g-x')
hold on
plot([1:length(z)],z,'g-x')