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

New to MATLAB?

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

890 correct solutions 1718 incorrect solutions
Last solution submitted on Aug 27, 2015

Problem Comments