cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

If Statement with Three Ranges (REPOST WITH M15 FILES)

Highlighted
Participant

If Statement with Three Ranges (REPOST WITH M15 FILES)

I was getting a few of views on this but no replies (I'm assuming) because my files were in Prime 4.0.  I've added some more files viewable without 4.0.

 

I'm having trouble creating a program with an if statement that has three ranges, i, j, & k.  Results would be a matrix with k submatrices each with i rows and j columns.  See attached.  

3 REPLIES 3

Re: If Statement with Three Ranges (REPOST WITH M15 FILES)

Something like this?

B.png

Re: If Statement with Three Ranges (REPOST WITH M15 FILES)

Either you're too fast or I'm too slow!

 

Very neat use of vectorization!

Re: If Statement with Three Ranges (REPOST WITH M15 FILES)

The data structure of M,N and X looks rather unnecessary blown up.

Maybe something more simple would do the job as well:

B.png

 

If for some reason you really need those structures M, N you could easily create it using one of the following methods:

B2.png