From 45b0041675946323221264b04e853019a86b2497 Mon Sep 17 00:00:00 2001 From: Rich <m87rich@iastate.edu> Date: Sat, 22 Apr 2017 17:11:23 -0500 Subject: [PATCH] Added basic documentation to the function used to calculate moments of inertia. --- controls/MATLAB/momentOfInertia/J_calc_bifilar.m | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/controls/MATLAB/momentOfInertia/J_calc_bifilar.m b/controls/MATLAB/momentOfInertia/J_calc_bifilar.m index 9f52a69ec..0e7945bff 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 -- GitLab