I have a matrix
b = [1+ 1i, 2 + 1i, 2+ 2i, 3 + 3i, 3+ 3i ; ...
1.2 + 2i , 2+2i, 2.1 + 2.1i, 3+2.1i, 3.1 + 3.2i]
where real(b)
is the x
coordinate, b(x,:)
is one experiment, and imag(b)
is the y
coordinate.
I want two things:
plot my experiments in a 2d plot as lines (but the points have to be in the right order)
plot my
y
(usually calledz
) coordinate as a surface over the axesx
and experiment.
The problem is, that I want lines along the rows and Matlab mixes the coordinates of the complex numbers up and the line appears in a zig-zag all over the place.
The more basic problem is that I want to have bars from x1
to x2
at y1
and I only came up with adding a data point y1
at x1
and x2
. But at x2
there is also y2
which seems to confuse Matlab.