diff --git a/controls/MATLAB/momentOfInertia/J_calc_bifilar.m b/controls/MATLAB/momentOfInertia/J_calc_bifilar.m index 9f52a69ec50752c0c2b2b644f1a5b373ccc74bcb..0e7945bfff9acae2a5dfcefe2c7f0278ccbca208 100644 --- a/controls/MATLAB/momentOfInertia/J_calc_bifilar.m +++ b/controls/MATLAB/momentOfInertia/J_calc_bifilar.m @@ -1,6 +1,14 @@ function J = J_calc_bifilar( m , g, D, L, t, n , varargin) -%UNTITLED Summary of this function goes here -% Detailed explanation goes here +% J = J_calc_bifilar( m , g, D, L, t, n) +% J = J_calc_bifilar( m , g, D, L, t, n , mode_option) +% +% m , D , L , t , and n are vectors containing the mass, distance between +% strings, legnth of strings, time, and cycles of a set of tests. g is the +% acceleration of gravity you want to use. +% +% mode_option is an optional input which will specify how to calculate J: +% mode_option = 0 will use averageing of the trials (default) +% mode_option = 1 will use least squares of the whole data set average_strings = {'average','mean','ave'}; least_squares_strings = {'least squares','ls'}; @@ -30,7 +38,5 @@ if mode == 1 %least squares J = (16*pi^2*L./(m*g.*D.^2))\(t./n).^2 ; end - - end