extracting the the first n columns of X and Y

3 views (last 30 days)
Chris
Chris on 17 Nov 2013
Commented: Chris on 17 Nov 2013
I nedd to extract only the first n columns of a data I loaded into my function and have to enforce n<=9 and also use a loop to plot the rth column of X against the rth column of Y in the rth subplot, I am allowed to choose how many subplots I want, I really need help with this, right now ive figured out,
function coa08xxx_lines(n)
s = load('xydata.mat','X','Y');
theTable = s.theTable;
[rows, columns] = size(theTable);
columnsToExtract = [];
for c = 1 : n : (columns-n)
columnsToExtract = [];
end
  2 Comments
Walter Roberson
Walter Roberson on 17 Nov 2013
Where is your code for choosing the number of subplots that you want?
Chris
Chris on 17 Nov 2013
i dont know how to do that, was hoping someone could explain this to me, let's say my value of r is 1,2 and 3. do you know what im supposed to type in?

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!