MATLAB: Plot excel data in MATLAB

excel

hi all, I have two column in excel I want to plot them by using matlab, lets say I have first column from A1-A10 and second column from B1-B10. how could I plot them in MATLAB ?? please help..

Best Answer

[v,T,vT]=xlsread('name.xls')
% 'xlsx' for exell 2007
%v: Double
%T and vT : cell
%use v containing numbers
t=v(:,1);y=v(:,2)
%if u have to plot second colone depending on first:
plot(t,y)