source: MML/trunk/mml/switchunits.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 883 bytes
Line 
1function Units = switchunits(varargin)
2%SWITCHUNITS - Change the units field  for all families in the MML
3%  Units = switchunits(Command)
4%
5%  INPUTS
6%  1. Command - 'Hardware' or 'Physics'
7%
8%  See also switchmode, switch2hw, switch2physics
9%
10%  Written by Greg Portmann
11
12if length(varargin) == 0
13    ButtonName = questdlg('Matlab MiddleLayer Units?',getfamilydata('OperationalMode'),'Hardware', 'Physics', 'Hardware');
14    switch ButtonName,
15        case 'Hardware'
16            switch2hw;
17            Units = 'Hardware';
18        case 'Physics'
19            Units = 'Physics';
20            switch2physics;
21    end
22else
23    if strcmpi(varargin{1},'hardware') | strcmpi(varargin{1},'hw')
24        switch2hw;
25        Units = 'Hardware';
26    elseif strcmpi(varargin{1},'physics')
27        switch2physics;
28        Units = 'Physics';
29    else
30        error('Units type unknown.');
31    end
32end
Note: See TracBrowser for help on using the repository browser.