Matlab multiplication of polynomials with syms

Click For Summary
SUMMARY

The discussion addresses the limitations of MATLAB's built-in functions for multiplying symbolic polynomials using the 'syms' command. Users encountered an error with the 'conv' and 'conv2' functions, which do not support symbolic inputs. The recommended solution involves defining each polynomial symbolically and using the 'expand' function to perform multiplication. This method effectively circumvents the issue by leveraging MATLAB's symbolic capabilities.

PREREQUISITES
  • Familiarity with MATLAB's symbolic toolbox
  • Understanding of polynomial representation in MATLAB
  • Knowledge of the 'expand' function in MATLAB
  • Basic concepts of symbolic mathematics
NEXT STEPS
  • Research MATLAB symbolic toolbox documentation
  • Learn how to define and manipulate symbolic polynomials in MATLAB
  • Explore the 'expand' function and its applications
  • Investigate alternative methods for polynomial multiplication in MATLAB
USEFUL FOR

Mathematics students, engineers, and researchers who utilize MATLAB for symbolic computation and need to perform polynomial operations effectively.

Ngineer
Messages
62
Reaction score
1
Is there anyway around this problem?

syms m,n;
x1 = [0, 1, 4, m];
x2 = [3, n, 9, 27];
conv(x1,x2)
Undefined function 'conv2' for input arguments of type 'sym'
 
Physics news on Phys.org
The conv and conv2 functions do not accept symbolic inputs.

I recommend you just generate each symbolic polynomial and then multiply. I don't have MATLAB here but I think it would be something like this:

syms m,n;
x1 = x^2+4x-m;
x2 = 3x^3+nx^2+9x+27;
expand(x1*x2)

http://www.mathworks.com/help/symbolic/expand.html
 

Similar threads

  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 5 ·
Replies
5
Views
4K
Replies
3
Views
2K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 5 ·
Replies
5
Views
3K
  • · Replies 1 ·
Replies
1
Views
5K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
Replies
1
Views
3K