plot excel data in MATLAB
334 views (last 30 days)
Azzi Abdelmalek on 14 Jul 2012
% 'xlsx' for exell 2007
%T and vT : cell
%use v containing numbers
%if u have to plot second colone depending on first:
More Answers (2)
Image Analyst on 14 Jul 2012
Edited: Image Analyst on 14 Jul 2012
Use xlsread() to get the entire contents of your workbook into a cell array.
[num,txt,raw] = xlsread(filename); % From the help
Then use cell2mat or something to extract out columns into an x array and a y array.
x = cell2mat(num(1:10, 1)); % Untested
y = cell2mat(num(1:10, 2)); % Untested
Then, to plot, use