03-17-2013, 10:34 AM
|
#24
|
|
drunken science
Join Date: Jul 2003
Location: Raleigh, NC
Posts: 5,511
My Ride: Trek 1.2
|
Ok, who knows arrays?
I have two arrays, 1D and 2D. I need to plot plot the 1D on the X axis and the rows of the 2D on the Y. So for every X value, I have a row in the 2D array that should be plotted in the Y. I can plot the 1D against a single value from the 2D, but I keep getting a dimensional mismatch error when I try to plot the entire row against the 1D, and I'm not sure why.
Here I'm trying to plot a single row against the 1D array, the end goal plotting every row against every value in the 1D array.
Code:
plot(drive_force[0:j],theta[2,0:n])
drive_force is 1 x j and theta is n x j. Would it work if I transposed theta to j x n?
Last edited by cowmoo32; 03-17-2013 at 10:34 AM.
|
|
|