Write function to expand array and average adjacent entries.
显示 更早的评论
Write a function twice.m: function y = twice(x) ... end which expands the input signal by inserting the average of the adjacent entries. For example, >> twice([1 5 2 4]) ans = 1 3 5 3.5 2 3 4 You are not allowed to use for-loop in this problem.
采纳的回答
更多回答(2 个)
Please show what you have done so far for your homework problem....
The more effort you show, the more help you will likely get.
Sean de Wolski
2012-10-16
0 个投票
I answered this here:
类别
在 帮助中心 和 File Exchange 中查找有关 Array Geometries and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!