Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
multiplying ppforms

Subject: multiplying ppforms

From: xyzxyz

Date: 7 Apr, 2011 16:04:09

Message: 1 of 2

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.

Subject: multiplying ppforms

From: Roger Stafford

Date: 7 Apr, 2011 20:23:20

Message: 2 of 2

"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

Tags for this Thread

No tags are associated with this thread.

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us