Skip to content
{{ message }}

Instantly share code, notes, and snippets.

# iemcd/boatmath.m

Created Aug 17, 2019
 % Estimating the length & beam of boats from their tonnage. % Ian McDougall % 25 July 2019 clear all, close all, nfig=0; % The Thames Measurement (TM) estimates the tonnage of a ship given its length (LOA) and beam in feet. It is intended for yachts. function tons = TM(LOA,beam) tons = ((LOA - beam).*beam.^2)/188; endfunction % The Builder's Old Measurement (BOM) estamtes the tonnage of a ship given its LOA and beam in feet. It is older than the Thames measurement. function tons = BOM(LOA,beam) tons = ((LOA - 0.6*beam).*beam.^2)/188; endfunction % This rule-of-thumb (ROT) estimates the beam in feet, given the LOA. function beam = ROT(LOA) beam = LOA.^(2/3) +1; endfunction % The hull speed is an early boat limitation in knots, given LWL in feet (length at the waterline) function vhull = hull(LWL) vhull = 1.34.*LWL.^0.5; endfunction init_ft = 10; tons = 0; for i = 1:10 tons = i length = fzero(@(LOA) BOM(LOA,ROT(LOA))-i,init_ft) vhull = hull(length) init_ft = length; endfor
to join this conversation on GitHub. Already have an account? Sign in to comment