matlab - Making coordinates out of arrays -


so, have 2 arrays:

x'  ans =      2.5770    2.5974    2.1031    2.7813    2.6083    2.9498    3.0053    3.3860  >> y'  ans =      0.7132    0.5908    1.9988    1.0332    1.3301    1.1064    1.3522    1.3024 

i combine n-th members of 2 arrays together, , plot coordinates on graph. should be:

{(2.5770,0.7132), (2.5974,0.5908)...} 

is possible do? if so, how?

schorsch showed simple plot, answer question asked in title, can combine arrays coordinates arranging vectors rectangles.

your x , y vertical, can put them side-by-side in 2-column matrix: combined = [x y]

or transform , have 2 rows: combined = [x' ; y']

(because they're vertical, don't want these, concatenate them out 1 long column or row: [x ; y] or [x' y'])

just clear, though, not needed plotting.

edit: suggested edit asked happens if plot(combined). depends if it's horizontal or vertical version. in case, plotting 2x? matrix won't plot x vs. y. plots of columns versus simple indices 1,2,3,... first way defined combined make 2 lines, plotting x , y on y-axis against indices on x-axis, , second version of combined make strange plot of values of x plotted in vertical column x=1 , of points of y beside @ x=2.


Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -