Reading CSV File and using Surf to plot data
I have 3 csv files which contains co-ordinates X, Y and Z resp. I am
trying to plot them in matlab using surf function. These co-ordinates are
recorded against time,
For eg. FirstX.csv, contains,
10,20,30
20,30,40
20,30,40
Each row in this file is X coordinate against record time. Similary for
FirstY.csv and FirstZ.csv
I tried something like following,
X=csvread(FirstX.csv)
Y=csvread(FirstY.csv)
Z=csvread(FirstZ.csv)
surf(X,Y,Z)
gives error saying "Data Dimensions must agree"
Any help would be appreciated.
No comments:
Post a Comment