Code covered by the BSD License  

Highlights from
Matgraph

from Matgraph by Ed Scheinerman
Toolbox for working with simple, undirected graphs

Description of inv

inv

PURPOSE ^

inv(p) returns the inverse permutation of p

SYNOPSIS ^

function q = inv(p)

DESCRIPTION ^

 inv(p) returns the inverse permutation of p

CROSS-REFERENCE INFORMATION ^

This function calls:
  • array array(p) --- return p as an array
  • permutation constructor for the permutation class
This function is called by:
  • mpower p^t is p multiplied by itself t times. May have t <= 0.

SOURCE CODE ^

0001 function q = inv(p)
0002 % inv(p) returns the inverse permutation of p
0003 a = array(p);
0004 [y,b] = sort(a);
0005 q = permutation(b);

Generated on Thu 13-Mar-2008 14:23:52 by m2html © 2003

Contact us at files@mathworks.com