Clear Filters
Clear Filters

Write a function halfway(n) that given an odd integer n as input, returns the integer that’s halfway between 1 and n. >> halfway(9) ans = 5

1 view (last 30 days)
plz help

Accepted Answer

KSSV
KSSV on 20 Sep 2018
N = 9 ;
x = round(mean(1:N))

More Answers (0)

Categories

Find more on MATLAB in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!