function [ftrack, rtrack, itrack] = fit_the_track(tmm, xdd, fdd, rdd, idd) // // [ftrack, rtrack, itrack] = fit_the_track(tmm, xdd, fdd, rdd, idd) // // spline fit of the data // // ------------------------------------------------------------------------ // copyright 2007 Alfred Steffens Jr. // ----------------------------------------------------------------------- // ----------------------------------------------------------------------- // Copying Permission: // // This is free software; you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by // the Free Software Foundation. // // This software is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // // You should have received a copy of the GNU General Public License // along with this software (see file called "COPYING"); if not, write to // the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, // MA 02111-1307 USA // ------------------------------------------------------------------------ // ydff = interpln([tmm' ; fdd'], xdd); // 1st cut at curve [yl, dl] = lsq_splin(xdd, ydff, tmm'); ftrack = interp(xdd, tmm', yl, dl); // frequencies ydrr = interpln([tmm' ; rdd'], xdd); // 1st cut at curve [yl, dl] = lsq_splin(xdd, ydrr, tmm'); rtrack = interp(xdd, tmm', yl, dl); // real amplitudes ydii = interpln([tmm' ; idd'], xdd); // 1st cut at curve [yl, dl] = lsq_splin(xdd, ydii, tmm'); itrack = interp(xdd, tmm', yl, dl); // imag amplitudes endfunction