Extracting a matrix from within a matrix
| Jonpope | May 14, 2012 - 06:27 | ||
|---|---|---|---|
|
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 |
|||

Joined: 2007-06-29
Location: United States
Hi Jon,
Try
Duplicate/R=[rows range][cols range] srcWave,destWave
A.G.
WaveMetrics, Inc.
Joined: 2009-03-22
Location: Belgium
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.Joined: 2012-01-11
Location: United Kingdom
Excellent, thank you very much.
Joined: 2012-01-11
Location: United Kingdom
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!
Joined: 2007-06-29
Location: United States
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