Path: news.mathworks.com!not-for-mail From: <HIDDEN> Newsgroups: comp.soft-sys.matlab Subject: Re: multiplying ppforms Date: Thu, 7 Apr 2011 20:23:20 +0000 (UTC) Organization: The MathWorks, Inc. Lines: 15 Message-ID: <inl6fo$h2q$1@fred.mathworks.com> References: <inkn9p$gf7$1@fred.mathworks.com> Reply-To: <HIDDEN> NNTP-Posting-Host: www-03-blr.mathworks.com Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: fred.mathworks.com 1302207800 17498 172.30.248.48 (7 Apr 2011 20:23:20 GMT) X-Complaints-To: news@mathworks.com NNTP-Posting-Date: Thu, 7 Apr 2011 20:23:20 +0000 (UTC) X-Newsreader: MATLAB Central Newsreader 1187260 Xref: news.mathworks.com comp.soft-sys.matlab:720709 "xyzxyz" wrote in message <inkn9p$gf7$1@fred.mathworks.com>... > I have two piecewise interpolation polynomials : f_n(x) and g_n(x). > 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). > I tried multiplying pp1*pp2 and give me this error: > > Undefined function or method 'mtimes' for input arguments of type 'struct'. > > Could you please give me any hints on how to solve this problem? > Thank you. - - - - - - - - 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. 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? Roger Stafford