Interpolator - MATLAB Cody - MATLAB Central

Problem 72. Interpolator

Difficulty:Rate
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) and a(n+1) that flank it. Now interpolate the value, vb, such that it is proportionally between b(n) and b(n+1).
Note that va can land exactly on a value of a as well.

Solution Stats

40.37% Correct | 59.63% Incorrect
Last Solution submitted on Nov 04, 2025

Problem Comments

Solution Comments

Show comments
Join Cody Contest 2025 — Have Fun and Win Prizes!
...
We’re excited to invite you to Cody Contest 2025! 🎉 Pick a team,...
Dive Into Hands-On Learning at MATLAB EXPO 2025 – Register Now!
Get ready to roll up your sleeves at MATLAB EXPO 2025 –...
0

Problem Recent Solvers3390

Suggested Problems

More from this Author96

Problem Tags

Community Treasure Hunt

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

Start Hunting!