MATLAB: I have a matrix 6*2 as following (UNDER THE PLOT), after plotting them i get what you see in the figure. so how can i extract data points in new matrix with fixed increment inYaxis(for example of value 0.1 increment )without change Zvalue for curve

extarct data pointsnew data matrix from a plot

X=[0 1 2;1 4 2;2 9 2;3 13 2;4 18 2;5 15 2;5 15 4;4 18 4;3 13 4;2 9 4;1 4 4;0 1 4]

Best Answer

Hello Faez,
From your description it sounds like you would like to interpolate the value of the line at a point that is not defined in your original matrix. In order to do this you could make use of the "interp2" function. For examples and details on how to use the function refer to the documentation: http://www.mathworks.com/help/matlab/ref/interp2.html