function m = mphv4(obj)
% MPHV4 convert a FEM structure or FEMGUI object to a model object
% 
%   MODEL = MPHV4(OBJ) converts OBJ (FEM structure or FEMGUI object) to the
%   model object MODEL.
% 
%   If OBJ is defined as FEMGUI object, MODEL contains the sequences that
%   correspond to the generation of the FEM structure.
%   If OBJ is defined as a FEM structure, MODEL only contains imported data.
% 
%   Note: The MPHV4 function requires that you run COMSOL with MATLAB in 
%   compatibility mode.
% 
%   Example:
%     % Set the variable fem as a FEMGUI object:
%     fem=femgui;
%     % Set-up and solve the model:
%     fem.geom = circ2;
%     fem.mesh = meshinit(fem);
%     fem.shape = 2; fem.equ.c = 1; fem.equ.f = 1; fem.bnd.h = 1;
%     fem.xmesh = meshextend(fem);
%     fem.sol = femlin(fem);
%     postplot(fem,'tridata','u')
%     % Convert the above sequence to a COMSOL 4 model object:
%     model = mphv4(fem);

% Copyright 2010-2011 COMSOL
