Q：未知的“特征”功能

I'm totally new to MATLAB, and I have dificulties with some code I have to understand for my project.

Here is the code :

``````feature         = feature(1:64,:,:);
feature(43,:,:) = [];
feature(33,:,:) = [];
feature         = feature([36,38,45,46,47,53,54,55,59,60,61],:,:);
``````

I don't realy understand what does the feature function does or is. Is it a table? A matrix? And what does (1:64,:,:) mean? The same for (43,:,:)? Is it a MATLAB notation ? Where can I find a sum up of these notations?

``````feature         = feature(1:64,:,:);
feature(43,:,:) = [];
feature(33,:,:) = [];
feature         = feature([36,38,45,46,47,53,54,55,59,60,61],:,:);
``````

answer1： 回答1：

the variable feature is a multidimensional matrix of dimension 3 (aka 3D array, e.g. RGB image). In fact, almost everything in Matlab is a matrix.

And what does (1:64,:,:) mean?

This says take elements from 1:64 along the first dimension of the variable. 1:64 expands to [1, 2, 3, ..., 64]

feature now has size 64xNxK

The same for (43,:,:) ?

This says give me the elements at row 43

When you say

``````feature(43,:,:) = []
``````

you delete this row from the matrix. Now the matrix size is one row less.

See here for the documentations http://www.mathworks.com/help/matlab/math/matrix-indexing.html

``````feature(43,:,:) = []
``````

matlab