Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


samar
Posts:
7
Registered:
7/25/11


Re: Coefficients of csapi
Posted:
Jul 28, 2011 9:59 PM


"Grace Gu" wrote in message <j0mh5h$kt8$1@newscl01ah.mathworks.com>... > "samar" wrote in message <j0k4s9$7t0$1@newscl01ah.mathworks.com>... > > Hi Grace, > > > > Did you have any explanations to these coeficients for multivariate splines? > > > > If you have an idea on how to write a multivariate spline, on a given interval of points, in terms of coeficients please let me know!! > > > > Thank you so much! > > Hi Samar, > I am not sure how to do multivariate splines, but I do have an idea how to evaluate a multivariate spline now, which was all I wanted to know earlier. If evaluation is also only what you want, you could read on Carl de Boor's works, and let me know if you are still confused by the coefficients. > ~Grace
Hi, Thank you very much Grace for your answer. By reading some works of Carl de Boor I realize that multivariate splines are tensor product of univariate ones. However, if I try to evaluate a bivariate spline (with two variables) by using coefficients it doesn't work. I think that I'm not using coeficient in a right way!!!
let's look to the example given in the Matlab csapi help:
x =.0001+[4:.2:3]; y = 3:.25:2; [yy,xx] = meshgrid(y,x); r = pi*sqrt(xx.^2+yy.^2); z = sin(r)./r; bcs = csapi( {x,y}, z ) %to evaluate in (x1,y1) x1=3.8; y1=2.9; z1=fnval(bcs,{x1,y1})
Results are the following:
bcs =
form: 'pp' breaks: {[3.9999 3.7999 3.5999 3.3999 3.1999 2.9999] [3 2.7500 2.5000 2.2500 2]} coefs: [1x20x16 double] pieces: [5 4] order: [4 4] dim: 1 z1=0.0425
Coefs is a matrix of 20 lines and 16 columns: 20 is the number of combinations of the two intervals x1 and y1 and 16 is the number of coeficients for a given two intervals I1 and I2 (x1 in I1 and x2 in I2)!
We have x1 in [3.9999;3.7999) and y1 in [3;2.75) so I used the first piece of the polynome which corresponds to the 1st line of the coeficient matrix! Is it correct?
I evaluate this polynome in (x1,y1) as follows: z2= bcs.coefs(1,1,1)* (x1 c1)^3 * (y1c2)^3+ bcs.coefs(1,1,2)* (x1 c1)^3 * (y1c2)^2+ bcs.coefs(1,1,3)* (x1 c1)^3 * (y1c2)+ bcs.coefs(1,1,4)+ bcs.coefs(1,1,5)* (x1 c1)^2 * (y1c2)^3+...
But I haven't the same result as z1!!! I hope it's clear!
Thank you very much



