I know this is a probably stupid and well addressed question, but since I am a beginner in Mathematica, the answers from p. How do I solve problems when I get a Part :: partd or Part :: partw error? it is not clear to me …

If someone could help me solve my problem and explain what is wrong, I would appreciate it.

I am trying to implement one of the answers they gave me for this question. I chose to implement the response from user2757771.

So, I have an R matrix (A in the other publication) that I import from a csv file.

Then I have a matrix Y (B in the other publication), which I create with 0 or an unknown coefficient. The following code can be copied / pasted to generate the matrix Y.

Both are 16 by 16 and symmetric matrix.

```
Y = {{Subscript(y, 11), Subscript(y, 12), 0, 0, 0, 0,
Subscript(y, 17), Subscript(y, 18), 0, 0, Subscript(y, 111),
Subscript(y, 112), 0, 0, 0, 0},
{Subscript(y, 12), Subscript(y, 22), Subscript(y, 23), 0, 0, 0,
Subscript(y, 27), Subscript(y, 28), Subscript(y, 29), 0,
Subscript(y, 211), Subscript(y, 212), Subscript(y, 213), 0, 0, 0},
{0, Subscript(y, 23), Subscript(y, 33), Subscript(y, 34), 0, 0,
0, 0, Subscript(y, 39), Subscript(y, 310), 0, Subscript(y, 312),
Subscript(y, 313), Subscript(y, 314), 0, 0},
{0, 0, Subscript(y, 34), Subscript(y, 44), Subscript(y, 45),
Subscript(y, 46), 0, 0, 0, Subscript(y, 410), 0, 0,
Subscript(y, 413), Subscript(y, 414), Subscript(y, 415),
Subscript(y, 416)},
{0, 0, 0, Subscript(y, 45), Subscript(y, 55), Subscript(y, 56),
0, 0, 0, 0, 0, 0, 0, Subscript(y, 514), Subscript(y, 515),
Subscript(y, 516)},
{0, 0, 0, Subscript(y, 46), Subscript(y, 56), Subscript(y, 66),
0, 0, 0, 0, 0, 0, 0, Subscript(y, 614), Subscript(y, 615),
Subscript(y, 616)},
{Subscript(y, 17), Subscript(y, 27), 0, 0, 0, 0,
Subscript(y, 77), Subscript(y, 78), 0, 0, Subscript(y, 711),
Subscript(y, 712), 0, 0, 0, 0},
{Subscript(y, 18), Subscript(y, 28), 0, 0, 0, 0,
Subscript(y, 78), Subscript(y, 88), Subscript(y, 89), 0,
Subscript(y, 811), Subscript(y, 812), 0, 0, 0, 0},
{0, Subscript(y, 29), Subscript(y, 39), 0, 0, 0, 0,
Subscript(y, 89), Subscript(y, 99), Subscript(y, 910), 0,
Subscript(y, 912), Subscript(y, 913), 0, 0, 0},
{0, 0, Subscript(y, 310), Subscript(y, 410), 0, 0, 0, 0,
Subscript(y, 910), Subscript(y, 1010), 0, 0, Subscript(y, 1013),
Subscript(y, 1014), 0, 0},
{Subscript(y, 111), Subscript(y, 211), 0, 0, 0, 0,
Subscript(y, 711), Subscript(y, 811), 0, 0, Subscript(y, 1111),
Subscript(y, 1112), 0, 0, 0, 0},
{Subscript(y, 112), Subscript(y, 212), Subscript(y, 312), 0, 0,
0, Subscript(y, 712), Subscript(y, 812), Subscript(y, 912), 0,
Subscript(y, 1112), Subscript(y, 1212), Subscript(y, 1213), 0, 0,
0},
{0, Subscript(y, 213), Subscript(y, 313), Subscript(y, 413), 0,
0, 0, 0, Subscript(y, 913), Subscript(y, 1013), 0,
Subscript(y, 1213), Subscript(y, 1313), Subscript(y, 1314), 0, 0},
{0, 0, Subscript(y, 314), Subscript(y, 414), Subscript(y, 514),
Subscript(y, 614), 0, 0, 0, Subscript(y, 1014), 0, 0,
Subscript(y, 1314), Subscript(y, 1414), Subscript(y, 1415),
Subscript(y, 1416)},
{0, 0, 0, Subscript(y, 415), Subscript(y, 515),
Subscript(y, 615), 0, 0, 0, 0, 0, 0, 0, Subscript(y, 1415),
Subscript(y, 1515), Subscript(y, 1516)},
{0, 0, 0, Subscript(y, 416), Subscript(y, 516),
Subscript(y, 616), 0, 0, 0, 0, 0, 0, 0, Subscript(y, 1416),
Subscript(y, 1516), Subscript(y, 1616)}}
```

Get out:

The next step is to invert the matrix Y:

```
Yinv = Inverse(Y)
```

The computer worked for a while … and the result is quite surprising. Sample `Out: Inverse(Y)`

without any errors Is this shown this way because the output is too large to display? For example 4 by 4 that I also executed on my side, the result was already quite extensive for this inverse.

And finally, I adapted the resolution part in:

```
Solve(Table(
If(MatchQ(Y((i, j)), Subscript(y, x_)), Yinv((i, j)), 0), {i,
16}, {j, 16}) ==
Table(If(MatchQ(Y((i, j)), Subscript(y, x_)), R((i, j)), 0), {i,
16}, {j, 16}))
```

To test this before solving, I tried:

```
T = Table(If(MatchQ(Y((i, j)), Subscript(y, x_)), R((i, j)), 0), {i,
16}, {j, 16})
```

Which one should return a table (matrix) where the elements of $ R_ {i, j} $ have been replaced by $ 0 $ if the item $ Y_ {i, j} = 0 $.

In other words, $ T_ {i, j} = R_ {i, j} $ Yes $ Y_ {i, j} neq 0 $ Y $ T_ {i, j} = 0 $ Yes $ Y_ {i, j} = 0 $

I got the following error:

and I really don't understand it since it worked well with the fictional example of 4 by 4 …