[Index for tmp_for_tar/vrml.doc] [Return to Master Index]

sub2ind

(tmp_for_tar/vrml.doc/sub2ind.m)


Function Synopsis

[r,c] = sub2ind(sz,ii)

Help text

       [r,c] = sub2ind(sz,i)

 r and c are the row and column of the i'th element of a matrix of
 size sz. That is, r = 1+rem(i,sz(1)), c = 1+floor(i/sz(1)).

 See also : ind2sub.

 Last modified: January 2000



Listing of function file tmp_for_tar/vrml.doc/sub2ind.m

##       [r,c] = sub2ind(sz,i)
##
## r and c are the row and column of the i'th element of a matrix of
## size sz. That is, r = 1+rem(i,sz(1)), c = 1+floor(i/sz(1)).
##
## See also : ind2sub.
##

## Author:        Etienne Grossmann  <etienne@isr.ist.utl.pt>
## Last modified: January 2000

function [r,c] = sub2ind(sz,ii)
  r = 1+rem(ii-1,sz(1));
  c = 1+floor((ii-1)/sz(1));

Produced by oct2html on Sat Dec 2 19:08:39 2000
Cross-Directory links are: ON