Extracting a matrix from within a matrix

Hello

I am attempting to extract a square area (containing a peak) from a large 2D wave as a secondary wave.

Thus far I have simply been using the total intensity within the square, which is defined by a number of pixels around a selected point e.g. PeakPosP+15,PeakPosP-15, PeakPosQ+15, PeakPosQ-15 with (PeakPosP, PeakPosQ) being selected either manually or using the V_maxrowloc, V_maxcolloc variables from the ImageStats command.

However I am now looking to carry out curve fitting on the area contained within the square and therefore need to keep the point values intact.

Is there any command with which I could duplicate a selected portion of the matrix? Or would it be a case of using the Make command allocating values for all the points afterward?

As always your help is greatly appreciated.

Regards
Jon
Hi Jon,

Try

Duplicate/R=[rows range][cols range] srcWave,destWave

A.G.
WaveMetrics, Inc.
Jonpope wrote:

However I am now looking to carry out curve fitting


I think you might even get away with just using wave subranges, e.g. CurveFit <options> MyWave[0,10][0,10], without having to make a temporary copy.
P.S. 741 Sorry just read your reply, I'm using the Gauss2d function to start with but may have to write a new function so it'll be easier to work with a new wave!
Jonpope wrote:
P.S. 741 Sorry just read your reply, I'm using the Gauss2d function to start with but may have to write a new function so it'll be easier to work with a new wave!

I'm not sure what you mean- FuncFit and CurveFit take mostly the same options, including wave subranges.

John Weeks
WaveMetrics, Inc.
support@wavemetrics.com