Dear all,(adsbygoogle = window.adsbygoogle || []).push({});

Iam looking for a generic code that could express the following functions:

Subscript[mata, 1] = hl[[1]];

Subscript[mata, 2] = matg[[2]].hl[[1]] + hl[[2]];

Subscript[mata, 3] = matg[[3]].matg[[2]].hl[[1]]

+ matg[[3]].hl[[2]] + hl[[3]];

Subscript[mata, 4] =

matg[[4]].matg[[3]].matg[[2]].hl[[1]]

+ matg[[4]].matg[[3]].hl[[2]]

+ matg[[4]].hl[[3]]

+ hl[[4]];

Subscript[mata, 5] = matg[[5]].matg[[4]].matg[[3]].matg[[2]].hl[[1]]

+ matg[[5]].matg[[4]].matg[[3]].hl[[2]]

+ matg[[5]].matg[[4]].hl[[3]]

+ matg[[5]].hl[[4]]

+ hl[[5]];

Please help me to get the right code for the above expressions. It may looks like this:

Subsript[mata,i] = ...... where i = 1,2,3,....17.

Thank you for any kind help.

**Physics Forums | Science Articles, Homework Help, Discussion**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Looking for a generic code using Mathematica

Loading...

Similar Threads for Looking generic code |
---|

MATLAB Coding up the step function |

Coding a numerical approximation for a damped pendulum |

MATLAB Coding angular spectrum of waves in a fluid |

MATLAB MATLab: Not enough inputs for nlinfit |

**Physics Forums | Science Articles, Homework Help, Discussion**