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 次查看(过去 30 天)
plz help

采纳的回答

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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

标签

产品

Community Treasure Hunt

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

Start Hunting!

Translated by