Page 1 of 1

Magnitude (3by1 vector)

PostPosted: Tue Mar 09, 2010 2:21 am
by space_egd
GMAT Function name: unitize3by1.gmf
Summary: Determines the magnitude of a 3by1 array of numbers
Latest Compatible Source code date: 12/23/2009
Depends on the following GMAT functions: none
Function inputs:
  1. 3x1 array
Function Outputs:
  1. Variable
Script Syntax:
Code: Select all
[out1] = mag3by1(in1)

Examples from calling script:
Code: Select all
% Object Creation
Create Variable out1;
Create Array in1[3,1];

% Begin Mission Sequence
BeginScript;
EndScript; % Ensures start of mission sequence in main script

in1(1,1) = 4;
in1(2,1) = -2;
in1(3,1) = 1;

[out1] = mag3by1(in1); % Call GMAT Function