I have array of natural numbers from 1 to n.(adsbygoogle = window.adsbygoogle || []).push({});

They are divided into m groups, where m*(m-1)=n.

I need all m-1 elements from first group, last m-2 elements from second group, last m-3 elements from third group...zero elements from last group.

For example

5*4=20:

1,2,3,4; 5,6,7,8; 9,10,11,12; 13,14,15,16; 17,18,19,20;.

I need 1,2,3,4; 6,7,8; 11,12; 16;

Thanks!

**Physics Forums - The Fusion of Science and Community**

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

# Matlab code natural numbers subset

Loading...

Similar Threads - Matlab code natural | Date |
---|---|

Backwards difference matrix divided by negative delta x? | Nov 25, 2015 |

How does one graph a vector? | Nov 18, 2015 |

MatLab code for these Integrals. | Jan 31, 2014 |

Need help with matlab code for newton-raphson (need help really bad) | Jul 1, 2012 |

Need help with Matlab code for gauss siedel i get errors, need imediat help | Jul 1, 2012 |

**Physics Forums - The Fusion of Science and Community**