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

Community Tip - Help us improve the PTC Community by taking this short Community Survey! X

If Statement with Three Ranges (REPOST WITH M15 FILES)

polarnaut
6-Contributor

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.  

1 ACCEPTED SOLUTION

Accepted Solutions

Something like this?

B.png

View solution in original post

3 REPLIES 3

Something like this?

B.png

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

 

Very neat use of vectorization!

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

Top Tags