int2ext

int2ext(i2e, bus, gen, branch, areas)

int2ext() - Converts internal to external bus numbering.

This function has two forms, (1) the old form that operates on
and returns individual matrices and (2) the new form that operates
on and returns an entire MATPOWER case struct.

1.  [BUS, GEN, BRANCH, AREAS] = INT2EXT(I2E, BUS, GEN, BRANCH, AREAS)
    [BUS, GEN, BRANCH] = INT2EXT(I2E, BUS, GEN, BRANCH)

Converts from the consecutive internal bus numbers back to the originals
using the mapping provided by the I2E vector returned from EXT2INT,
where EXTERNAL_BUS_NUMBER = I2E(INTERNAL_BUS_NUMBER).
AREAS is completely ignored and is only included here for backward
compatibility of the API.

Examples:
    [bus, gen, branch, areas] = int2ext(i2e, bus, gen, branch, areas);
    [bus, gen, branch] = int2ext(i2e, bus, gen, branch);

2.  MPC = INT2EXT(MPC)
    MPC = INT2EXT(MPC, MPOPT)

If the input is a single MATPOWER case struct, followed optionally
by a MATOWER options struct, then it restores all buses, generators
and branches that were removed because of being isolated or off-line,
and reverts to the original generator ordering and original bus
numbering. This requires that the 'order' field created by EXT2INT be
in place.

Examples:
    mpc = int2ext(mpc);
    mpc = int2ext(mpc, mpopt);

See also ext2int(), i2e_field(), i2e_data().