You will be given a row of numbers (x), and a single number (n). Your job is to write a script that will stretch out the row of numbers, putting n numbers between each of the numbers in x. The numbers you put in x will be linearly interpolated.
For example, if x=[1 5 2 4 3] and n=1, your output should be:
y=[1 3 5 3.5 2 3 4 3.5 3]
There is n=1 number between all of the original values of x, and the new values are linearly interpolated from the original values of x:
Find the alphabetic word product
1997 Solvers
794 Solvers
How long is the longest prime diagonal?
280 Solvers
Create a vector whose elements depend on the previous element
290 Solvers
Matlab Basics - Absolute Value
272 Solvers
Problem Tags