Skip to main content
deleted 2 characters in body
Source Link
cvgmt
  • 84.1k
  • 6
  • 97
  • 179

Maybe this?

layernumber = Accumulate[Mod[Range[1, 2 Nlayer], 2]];
interfacenumber = 1 + Accumulate[Mod[Range[0, 2 Nlayer - 1], 2]];
MapThread[Times, {layernumber, interfacenumber}]
Inner[X[#1]*Y[#2] &, layernumber, interfacenumber, List]
 
```

Maybe this?

layernumber = Accumulate[Mod[Range[1, 2 Nlayer], 2]];
interfacenumber = 1 + Accumulate[Mod[Range[0, 2 Nlayer - 1], 2]];
MapThread[Times, {layernumber, interfacenumber}]
Inner[X[#1]*Y[#2] &, layernumber, interfacenumber, List]
 
```

Maybe this?

layernumber = Accumulate[Mod[Range[1, 2 Nlayer], 2]];
interfacenumber = 1 + Accumulate[Mod[Range[0, 2 Nlayer - 1], 2]];
MapThread[Times, {layernumber, interfacenumber}]
Inner[X[#1]*Y[#2] &, layernumber, interfacenumber, List]
Source Link
cvgmt
  • 84.1k
  • 6
  • 97
  • 179

Maybe this?

layernumber = Accumulate[Mod[Range[1, 2 Nlayer], 2]];
interfacenumber = 1 + Accumulate[Mod[Range[0, 2 Nlayer - 1], 2]];
MapThread[Times, {layernumber, interfacenumber}]
Inner[X[#1]*Y[#2] &, layernumber, interfacenumber, List]

```