Literal Variables

조회 수: 12 (최근 30일)
Alejo Corsani
Alejo Corsani 2012년 4월 30일
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 ;-)

채택된 답변

Sean de Wolski
Sean de Wolski 2012년 4월 30일
conv isn't defined for symbolic inputs. Fortunately, sum/prod/diff are!
doc sym>sum
doc sym>prod
doc sym>diff
  댓글 수: 1
Alejo Corsani
Alejo Corsani 2012년 5월 1일
THX!!! XD

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Calculus에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by