Hello Guys,
i have a Question about Look up Tables. I have a really big Problem with unterstanding them, so you may help me quite a bit. I have a 12x6x32 double look up table filled with data called Parameters. In a writen Script of a Teaching class, there is a "Set up Look-Up-Tables" function.
The first function is
Parameters_people = parameters(:,:,3:2:end-1);
i dont unterstand what 3:2:end-1 means. What does that mean?
Which one of the 32 Dimensions of the Table do i use? Can you give me a fast help?

 Réponse acceptée

Image Analyst
Image Analyst le 26 Avr 2017

0 votes

parameters is a 3D array. Colon notation is startingIndex:increment:stoppingIndex. So 3:2:end-1 means elements 3,5,7,9,.....(element before the last one). Let's say the array was 12x6x32 so the indexing means 3,5,7,9,11,13,15,17,19,21,23,25,27,29,31 (that's 15 planes).
And ":" means "all" so (:,:,3:2:end-1) means all rows and all columns of planes 3,5,...31.
So Parameters_people would be a 12x6x15 3-D array.

Plus de réponses (0)

Catégories

En savoir plus sur Matrices and Arrays dans Centre d'aide et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by