http://www.mathworks.com/matlabcentral/newsreader/view_thread/305861
MATLAB Central Newsreader  multiplying ppforms
Feed for thread: multiplying ppforms
enus
©19942014 by MathWorks, Inc.
webmaster@mathworks.com
MATLAB Central Newsreader
http://blogs.law.harvard.edu/tech/rss
60
MathWorks
http://www.mathworks.com/images/membrane_icon.gif

Thu, 07 Apr 2011 16:04:09 +0000
multiplying ppforms
http://www.mathworks.com/matlabcentral/newsreader/view_thread/305861#829887
xyzxyz
I have two piecewise interpolation polynomials : f_n(x) and g_n(x).<br>
I have generated pp1 and pp2 using "interp1" to correspond to both polynomials. My problem is that I am trying to compute ppform of f_n(x)*g_n(x).<br>
I tried multiplying pp1*pp2 and give me this error:<br>
<br>
Undefined function or method 'mtimes' for input arguments of type 'struct'.<br>
<br>
Could you please give me any hints on how to solve this problem?<br>
Thank you.

Thu, 07 Apr 2011 20:23:20 +0000
Re: multiplying ppforms
http://www.mathworks.com/matlabcentral/newsreader/view_thread/305861#829948
Roger Stafford
"xyzxyz" wrote in message <inkn9p$gf7$1@fred.mathworks.com>...<br>
> I have two piecewise interpolation polynomials : f_n(x) and g_n(x).<br>
> I have generated pp1 and pp2 using "interp1" to correspond to both polynomials. My problem is that I am trying to compute ppform of f_n(x)*g_n(x).<br>
> I tried multiplying pp1*pp2 and give me this error:<br>
> <br>
> Undefined function or method 'mtimes' for input arguments of type 'struct'.<br>
> <br>
> Could you please give me any hints on how to solve this problem?<br>
> Thank you.<br>
       <br>
What kind of result would you like from such a "product"? If you mean the product of the respective polynomials on common or overlapping intervals, that would give you an order of polynomial equal to the sum of the previous orders. Cubics would become sixth order. I don't know of any such capability in Matlab, and it seems to me that it might well not be an optimum interpolation in any case.<br>
<br>
If you mean a new interpolation on the products of the two original functions defined at a set of common points, why not just start with those products and do a new interpolation from scratch? What is to be gained by referring to the separate interpolations in pp1 and pp2?<br>
<br>
Roger Stafford