Help with $ to call a wave
I am trying to write procedures to fit force curves measured with AFM. I have already wrote 2 functions, one to load the force curves, and the second one to fit and subtract the base line. I would like now to write another function to fit the constant compliance region. In a nutshell, I use FindLevel to find the subrange of the wave to fit and then I do the fitting. The FindLevel works, but the fitting doesn't (return a null wave as W_coef). I guess the problem is in the way I call the X wave in the fitting (dis_V_app below), which is called using $ from a wavelist. I called the wave as wave/T, which is the only way as not to have errors during compile, but I am not sure it is the actually correct way. Here below is the function, if someone has some suggestion it would be highly appreciated.
Function InvOLS_correction (startV, endV)
variable startV, endV
// Make a new wavelist with the baseline corrected waves
SetDataFolder Root:FC_BLcorrected
string InvOLSList = wavelist("*",";","")
NewDataFolder/O/S Root:FC_InvOLScorrected
Make/O/T/N=(itemsinlist(InvOLSList)) BLcorrectedFC
Wave_From_String (InvOLSList, BLcorrectedFC)
DeletePoints 0,1, BLcorrectedFC
DeletePoints 1,2, BLcorrectedFC
variable i=0
variable j=0
variable k=0
wave/T RawFC
for (i=0; i
June 12, 2018 at 12:12 am - Permalink
June 12, 2018 at 12:52 am - Permalink
June 12, 2018 at 02:12 am - Permalink
June 12, 2018 at 02:17 am - Permalink
June 12, 2018 at 02:17 am - Permalink
June 12, 2018 at 06:28 am - Permalink
thanks for your answer. I tryed your suggestion but nothing changes. I suspect that the problem is how I call the X wave of the fitting, because if I write it explicitly the fitting works (of course only for the wave I declared, meaning wave with the index 10 out of the group of waves I want to fit):
June 12, 2018 at 06:48 am - Permalink
June 12, 2018 at 08:25 am - Permalink
June 13, 2018 at 01:47 am - Permalink
June 13, 2018 at 06:31 am - Permalink
June 13, 2018 at 08:00 am - Permalink
June 13, 2018 at 08:05 am - Permalink
June 20, 2018 at 05:02 am - Permalink
June 20, 2018 at 05:02 am - Permalink
June 20, 2018 at 06:19 am - Permalink