Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Thread Subject:
faster ind2sub in 3D

Subject: faster ind2sub in 3D

From: Dave B

Date: 14 Feb, 2013 16:44:06

Message: 1 of 1


This question is about speeding up ind2sub, which from a search shows me that others have also been keen to find a faster alternative. I have found some suggestions for 2D such as :

r = rem(idx-1,nrows)+1;
c = (idx-r)/nrows + 1;

but none for 3D. Can anyone show me the modifications to make for 3D pls? Thanks!

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us