Skip to content

Instantly share code, notes, and snippets.

@sunsided
Created July 16, 2022 10:58
Show Gist options
  • Save sunsided/b177386bf98a3ce279916263be59f169 to your computer and use it in GitHub Desktop.
Save sunsided/b177386bf98a3ce279916263be59f169 to your computer and use it in GitHub Desktop.
Naismith's rule in Matlab, units in km and h
function [w, t, slope] = naismith(length, ascend)
slope = ascend/length;
t = length*(1/5) + ascend*(1/0.6);
w = length./t;
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment