matlab - How can I generate a set of n dimensional vectors that contains all integer points in an n-dimensional rectangular prism -


OK, so I'm working on a problem related to quantum chaos and everything I need to do is en-dimension Find all integer points for parallel pipes in the unit cube n-dimension and for this parallel interior. I am trying to do this using the following plan:

  1. Looking at the dimensions of the linear map B and cube n, we change the numbers to find the coordinates of the units of hyperbolicb. In 0 b (2 ^ N -1) in their binary representation and rotate them which describes the corner of the cube.
  2. The next step was to implement Map B for each of these vectors. A set of 2 ^ n vectors describing the coordinates of parallelpiped in N dimensions gives me
  3. < Li> Now, we take the maximum and minimum value obtained from any of these corners in each coordination direction, that is, the first element of my vector can have a maximum value of 4 in all corners and at least 3 can be valued Is there. It gives me an en-dimensional rectangular prism in which I have parallel pipes and some extra unwanted space.
  4. Now I get all the points in this border rectangular prism with the integer coordinates, which is described as vectors in the N dyes.
  5. Finally, I apply the inverse of the map B and remove any points which are more than 1 coefficients because they basically want to get my unit out of the hypicube.

My issue arises in step 4, I am struggling to prepare a way to create all the vectors with integer coordinates in my rectangular hyper-prism, so that when I fly Change the number of dimensions. Ideally, I would like to be able to increase N unless computational is too heavy to do this, but I am still trying to do every method of finding all the integer digits in the prism n / code> To index each element loops and thus I have to rewrite the code every time

So I think my question is, is there any way to code it so that I change n on the fly Sic Am I right? In addition, any ideas on the idea of ​​algorithms would be appreciated :) It will not surprise me if I have more and more things in a big way ...

Edit: Of course As soon as I post a question, I see a lovely link in the sidebar, where a clever way has already been given:

I will just leave it for this time in case someone has a normal No comment on method in form Minister is, but otherwise (since I can not take up yet because I'm still here say) Louis ridge beds, you are a hero!

I will leave it for this time, just someone has a comment on the method in general, but otherwise (since I can not go up yet, I will say this here) Luis Mendo, You are a hero!


Comments

Popular posts from this blog

apache - 504 Gateway Time-out The server didn't respond in time. How to fix it? -

c# - .net WebSocket: CloseOutputAsync vs CloseAsync -

c++ - How to properly scale qgroupbox title with stylesheet for high resolution display? -