Doxygen Source Code Documentation
gind2sub.m File Reference
Go to the source code of this file.
Functions | |
if (length(ndx)~=1) | |
fprintf (1,'Error zind2sub:length(IND) must be 1\n') | |
for for | v (i) |
Variables | |
function [err, v] | |
Bethesda MD Define the function name for easy referencing | FuncName = 'gind2sub' |
Debug Flag | DBG = 1 |
initailize return variables | err = 1 |
v = [ones(1,length(sz))] | |
return | |
end | n = length(sz) |
k = [1 cumprod(sz(1:end-1))] | |
ndx = ndx - 1 | |
for | i = n:-1:1 |
Function Documentation
|
|
|
|
|
|
Variable Documentation
|
Definition at line 33 of file gind2sub.m. |
|
Definition at line 54 of file gind2sub.m. |
|
Definition at line 30 of file gind2sub.m. |
|
Initial value: gind2sub (sz, ndx) % % [err,] = gind2sub () % %Purpose: % This function converts a linear index to multiple subscripts based on the dimensions. % It is a further modified version from Ziad's modification based on the original Matlab % function IND2SUB. The difference from what Ziad did is that we vary the subscript starting % from the last dimension and ends with the first dimension instead of the other way around. % %Input Parameters: % sz: dimension vector % ndx: counter index for the total number of combinations. % %Output Parameters: % err : 0 No Problem % : 1 Problems % v: array of subscripts % %Key Terms: % %More Info : % % Author : Gang Chen % Date : Tue Dec 23 10:57:48 EST 2003 % SSCC/NIMH/ National Institutes of Health Definition at line 1 of file gind2sub.m. |
|
Definition at line 49 of file gind2sub.m. |
|
Definition at line 46 of file gind2sub.m. |
|
Definition at line 45 of file gind2sub.m. |
|
Definition at line 51 of file gind2sub.m. Referenced by drawtriangle(), glutGetColor(), and glutSetColor(). |
|
Definition at line 55 of file gind2sub.m. |
|
Definition at line 41 of file gind2sub.m. |