You have a two vectors, a and b. They are monotonic and the same length. Given a value, va, where va is between a(1) and a(end) find the a(n), a(n+1) that flank it. Now interpolate the value, vb, such that it is proportionally between b(n) and b(n+1).
va can land exactly on a value of a.
WTF!
I know the function interp!! but I thougth I must program it... :-(
That's true, the instructions here do indicate that you're supposed to program it from scratch (e.g. find a(n) & a(n+1)).
For convenience, it would be useful if the code input variables were related to the variables listed in the solution window. We are given a, b, alpha, and beta in the Test Suite; the function that we are to type involves vb, va, a, and b. Sure, we can update it, but it just seems careless.
I couldn't remember interp1 but I formed a very silly code to do the same
Absolutely for the tests...
For convenience, it would be useful if the code input variables were related to the variables listed in the solution window. We are given a, b, alpha, and beta in the Test Suite; the function that we are to type involves vb, va, a, and b. Sure, we can update it, but it just seems careless.
good
good
The Goldbach Conjecture, Part 2
961 Solvers
Longest run of consecutive numbers
194 Solvers
Given a window, how many subsets of a vector sum positive
673 Solvers
Given a 4x4 matrix, swap the two middle columns
300 Solvers
Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
230 Solvers