Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
MicroCART
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Distributed Autonomous Networked Control Lab
MicroCART
Commits
45b00416
Commit
45b00416
authored
7 years ago
by
Matt Rich
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
controls/MATLAB/momentOfInertia/J_calc_bifilar.m
+10
-4
10 additions, 4 deletions
controls/MATLAB/momentOfInertia/J_calc_bifilar.m
with
10 additions
and
4 deletions
controls/MATLAB/momentOfInertia/J_calc_bifilar.m
+
10
−
4
View file @
45b00416
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment