I have a system of three equations that I'd like to solve via MATLAB, and I'm a bit confused on how to go about doing it.

I have three equations:

```
A = R*P1
B = R*P2
C = R*P3

```

`A, B, C`, and `P1, P2`, and `P3` are `3x1` matrices, while `R` is a `3x3` matrix. `R` is the same for all three equations.

I need to find `R`, and am given `A, B, C`, and the `P's`.

I wanted to use `fsolve`, but it seems that `fsolve` doesn't work when the variables are matrices. What is an alternative method that you would recommend using?

Just making up some numbers to work with:

```
P1 = [1;1;1];
P2 = [2;3;4];
P3 = [5;4;3];

R = [2 4 5; 1 5 4; 1 2 3];

```

Which would mean that:

```
A = [11;10;6];
B = [36;33;20];
C = [41;37;22];

```