Skip to content
Snippets Groups Projects
Commit 45b00416 authored by Matt Rich's avatar Matt Rich
Browse files

Added basic documentation to the function used to calculate moments of inertia.

parent 9bbbb526
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment