Error while mutliplying functions.
조회 수: 10 (최근 30일)
이전 댓글 표시
I'm trying to multiply these functions:
a = x^2
b = x
Obviously, It should give me: x^3
But when I write the code:
a = @(x)x^2;
b = @(x)x;
c = a*b;
I got the error: Undefined operator '*' for input arguments of type 'function_handle'.
What am I doing wrong?
댓글 수: 0
채택된 답변
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!