I am having difficulties trying to get my symbolic math code to work in the MATLAB Command Window. Below are some typical error messages I observe:
1) When trying to invert a matrix:
A := array(1..2, 1..2, [[1, 2], [3, PI]])numeric::inverse(A)
I get this error message:
Error: File: Untitled.m Line: 2 Column: 9 Unexpected MATLAB operator.
2) When I try to create an ellipse:
>> ellipse := plot::Ellipse2d(3, 1, [1, 1]);
I get this error message:
Undefined function 'ellipse' for input arguments of type 'char'.
3) When I try to use the following command:
>> Graph::createCompleteGraph(3)
I get this error message:
Graph::createCompleteGraph(3) Error: Unexpected MATLAB operator.
4) When trying to solve an equation using the Symbolic Math Toolbox SOLVE function:
>> syms x>> solve(x^4 - 5*x^2 + 6*x = 2, x)
I get this error message:
solve(x^4 - 5*x^2 + 6*x = 2, x) Error: The expression to the left of the equals sign is not a valid target for an assignment.
5) When computing a partial fraction decomposition for symbolic x:
>> syms x>> partfrac(x^2/(x^3 - 3*x + 2))
I get this error message:
Undefined function 'partfrac' for input arguments of type 'sym'.
6) When computing an integral:
>> int(1/x/ln(x), x = exp(1)..exp(2))
I get this error message:
int(1/x/ln(x), x = exp(1)..exp(2)) Error: The expression to the left of the equals sign is not a valid target for an assignment.
Best Answer