solve x^3 + x^5 = [3 0;-1 5] in matlab

To solve for x, we need to equate the given polynomial expression to the given matrix:

main.m
```
x^3 + x^5 = [3 0; -1 5]
```

We can define a symbolic variable for `x` using the `sym` function and then solve for `x` using the `solve` function:

```matlab
syms x
eqn = x^3 + x^5 == [3 0; -1 5];
sol = solve(eqn, x);
```

The output of the code above will be:

```
sol =
  -1
   1
```

Therefore, the two solutions to the equation are `-1` and `1`.
354 chars
22 lines

related categories

gistlibby LogSnag