Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Problem 1664. Lightning strike distance: Writing a function

Created by matlab.zyante.com

Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightning to hearing thunder. The speed of sound is 768 miles per hour at sea level; first define a variable with this value (good practice). Distance should be in miles.

Tags

Problem Group

Solution Statistics

463 correct solutions 1125 incorrect solutions
Last solution submitted on Jul 25, 2014

Problem Comments