Literal Variables
15 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
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 commentaires
Réponse acceptée
Sean de Wolski
le 30 Avr 2012
conv isn't defined for symbolic inputs. Fortunately, sum/prod/diff are!
doc sym>sum
doc sym>prod
doc sym>diff
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Calculus dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!