Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!

Problem 1664. Lightning strike distance: Writing a function

Created by

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.


Problem Group

Solution Statistics

920 correct solutions 1740 incorrect solutions
Last solution submitted on Nov 29, 2015

Problem Comments

Solution Comments