Vehicle speed calculation script

Hi I need M script file for Vehciel speed calculation and some basic mscript files for learning

Answers (2)

Here is a basic script to calculate the average vehicle speed:
Distance = 200; % km
Duration = 2.5; % hours
AvgSpeed = Distance/Duration % km/h
AvgSpeed = 80
D = input('Enter distance vehicle travelled: ');
T = input('Enter time required for the travel: ');
vehicle_speed = D ./ T

Products

Release

R2022b

Tags

Asked:

on 23 Sep 2022

Answered:

on 23 Sep 2022

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!