0
$\begingroup$

I am trying to create two functions but I am having trouble. The first consists of converting degrees Fahrenheit to Kelvin using this formula (F - 32)*(5/9) + 273 and another calculates the cricket chirping rate (in s^-1) using Dolbear's law which is Tf=40+N15 where Tf is the temperature in degrees Fahrenheit and N15 is the rate of chirps per minute.

I was able to make the temperature function.

f[F_] = (F - 32)*(5/9) + 273

I am just having trouble with the second function.

Thanks, L

$\endgroup$
  • $\begingroup$ Probably N15 is the number of chirps produced in 15 seconds (from Wikipedia article), so chirping rate is rate[Tf_] := (Tf - 40)/15. $\endgroup$ – Alx Sep 11 at 14:12
  • $\begingroup$ I am just having trouble with the second function. Oh go on, don't leave us guessing, tell us what trouble your are having ... $\endgroup$ – High Performance Mark Sep 11 at 16:07
0
$\begingroup$

According to the Wikipedia article, the formula is simply number of chirps in 15 seconds plus 40. Don't know why you would need a special function for that, but it would be:

chirpsToTemp[n_]:=n+40

Also, in your original post you really should have a colon before your equals sign

toKelvin[f_]=((f-32)*(5/9))+273
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.