Matlab: surface patch not working

I have a superficial plot that I am trying to do. x is a vector element, a vector of a vector 300, and z is an element matrix of size 300 * 11.

When I try to build it like this:

surf(x y z)

The surface does not appear. There are axles, but no surface. blank surface plot

However, if for some reason I make a surface plot of a subset of a matrix as follows:

surf(x y(1:31) z(1:31,:))

Then it works and the plot appears. working surface plot

As soon as I increase the number in brackets to 32, it stops working. If I change the range from 2:32, then it works, so it has nothing to do with the data only the size of the matrices.

What's going on here? How to fix it?

PS I would add code, but it's a little long and complicated, and imports .txt files to load into vectors x and y.

+5
source
2

, Matlab, , . painters, zbuffer OpenGL.

, , :

set(gcf(), 'Renderer', 'painters')

( , startup.m.):

set(0, 'Renderer', 'painters')

, Renderer, get set:

get(gcf(), 'Renderer')

(, OpenGL , ), ( , getframe() , ). , , .

Renderer:

, . , MATLAB. :

painters - , MATLAB, , .

zbuffer - MATLAB , , MATLAB , ( -). , , MATLAB .

OpenGL - OpenGL - , . , zbuffer, MATLAB , .

+6

/ ( y) ( z). , , .

: axis([6E-6 8E-6 9.2E14 10E14 0.96 1.06 -1 1])

: E-6 E-8, ...

: axis([xmin xmax ymin ymax zmin zmax cmin cmax])

+1

All Articles