Created
July 12, 2016 08:29
-
-
Save tenomoto/f2a932cdc417dd3cab6334cce7d4e320 to your computer and use it in GitHub Desktop.
Calculate the most developing wave number in the Eady problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env octave -qf | |
function y = f(x) | |
# the maximum of kci = sqrt((mu/2 - tanh mu/2)(mu/2 - cot mu/2)) is found by | |
# finding the zero of the derivative of the inside of sqrt. | |
y = x - (tanh(0.5*x) + coth(0.5*x)) - 0.5 * x * (1/(cosh(0.5*x))^2 - 1/(sinh(0.5*x))^2); | |
endfunction | |
format long | |
fsolve("f", 3.2) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment