Thursday 15 May 2014

matlab - Plotting columns in a matrix next to eachother -


I have a matrix (n, m) which detects one meter for every meter that I want to plot I am

I should put the y axis in the form of (1: m) where trace nr1 is plotted on y = 1, trace y = 2 and so on. I am having trouble defining the axis, can this be done? The values ​​in each trace / column are nearly the same range.

Answer 1: You can continuously add it to each column to plot it on different magnitudes Values;

  plot (bsxfan (@ plus, matrix, range (matrix (:)). * (1: size (matrix, 2))); Answer: You can use subplots:  
  for v = 1: size (matrix, 2) subdivision (size (matrix, 2), 1, v); Plot (matrix (,, v)); << Code>  

(Note: I can have columns and rows mixed in my indexes, I can not remember now sometimes ...)

No comments:

Post a Comment