Literal Variables
15 views (last 30 days)
Show older comments
Hy, I'm an italian Computer Engineering student from Italy and I just started using MATLAB for the work of my bachelor thesis. I'm trying to write some polynomials with literal variables different from x, like these:
A= x^3-b*x^2+a;
B= x^2+a*x-b
I would like then to apply the operations of sum, difference and product between these polynomials. I tried using:
>> syms a;
>>S=[1 -1 2];
>> G=[1 a 2];
>> P= conv(S, G)
but what I obtain is this error message:
Undefined function 'conv2' for input arguments of type 'sym'.
Error in conv (line 39)
c = conv2(a(:),b(:),shape);
HELLLLP!!!! PLEASEEE!!!! THX ;-)
0 Comments
Accepted Answer
Sean de Wolski
on 30 Apr 2012
conv isn't defined for symbolic inputs. Fortunately, sum/prod/diff are!
doc sym>sum
doc sym>prod
doc sym>diff
More Answers (0)
See Also
Categories
Find more on Calculus in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!