Robotran Matlab Documentation

Model loading

Loading of the model data from the xml description file (.mbs) generated by MBSysPad to Matlab.
For more information, see Robotran theoritical framework.

Code sample

For loading the model, insert the following code at the beginning of your main script and adapt it to your need :

%% 1. Initialization and Project Loading [mbs_load]
%--------------------------------------------------------------------------
close all; clear variables; clc; % Cleaning of the Matlab workspace
global MBS_user; % Declaration of the global user structure
MBS_user.process = ''; % Initialisation of the user field "process"
% Project loading
prjname = '$prjName$';
[mbs_data, mbs_info] = mbs_load(prjname,'default'); % Option 'default': automatic loading of "$project_name$.mbs"
mbs_data_ini = mbs_data; % Backup of the initial multibody data structure
% Have a look at the content of the mbs_data structure on www.robotran.be

Use

The loading is performed by the function mbs_load().

mbs_load
function mbs_load(in myproject_name, in mode, in filepath)
load a MBSystem in Matlab from a .mbs xml file description.