Code covered by the BSD License  

Highlights from
Model-in-the-Loop for Embedded System Test (MiLEST) preliminary version

Model-in-the-Loop for Embedded System Test (MiLEST) preliminary version

by

 

22 Mar 2011 (Updated )

This is a draft preliminary version of the MiLEST Framework for eduction purpose.

fix_pos(blocka,blockb,r,t)
function [] = fix_pos(blocka,blockb,r,t)

% fix the height distance between 2 blocks 
% blocka acts as the origin of coordinates
% blockb is the one move around the blocka
% t is for the down, r is for the left

Pos = get_param(blocka, 'Position');
Posb = get_param(blockb, 'Position');
B = Posb(3)-Posb(1);
H = Posb(4)-Posb(2);
pos1 = Pos(1)+r;
pos3 = pos1+B;
pos2 = Pos(4)+t;
pos4 = pos2+H;
set_param(blockb, 'Position',[pos1 pos2 pos3 pos4]);

Contact us