Ask an expert. Trust the answer.

Your academic and career questions answered by verified experts

How to interpolate values given a starting and end point?

Date: 2024-06-15 12:53:07

I have a voltmeter that I was using to measure voltage on a battery, unfortunatly it wasnt working properly and Im not able to do the test again. Before and after I ran the test I tested the voltage, so I know the real starting (50.6V) and ending (50.3V). My voltmeter recorded the power draw correctly but the values are off, they hover around 18V, how do I interpolate the bad values with a known starting and end point?
 
Example:
 
I know its 50.6 to 50.3 and my recordings are 18.2 to 17.9
 
I want the readings to be 50.6, 50.5, 50.4, 50.3 instead of 18.2, 18.1, 18.0, 17.9. I cant just add the difference because power draw wasnt exactly linear so Im trying to use the interp1 function but it isnt working for me. Thanks!
 

Expert Answer:

:

 
Use the rescale function —
 
 
Vrec = [18.2, 18.1, 18.0, 17.9];
Vrange = [50.6 50.3];
Vres = rescale(Vrec, Vrange(2), Vrange(1))
Vres = 1x4
   50.6000   50.5000   50.4000   50.3000

 

Why Matlabhelpers ?

Our Matlab assignment helpers for online MATLAB assignment help service take utmost care of your assignments by keeping the codes simple yet of high-quality. We offer the most reliable MATLAB solutions to students pursuing their Computer Science course from the Monash University, the University of Sydney, the University of New South Wales, the University of Melbourne; to name a few. Approach us today for best Matlab solutions online!

Our Comprehensive Matlab Assignment Help Services

Personalized Tutoring:Our team of MATLAB experts offers one-on-one tutoring sessions tailored to your specific needs. Whether you’re struggling with basic concepts or advanced algorithms, we provide clear, step-by-step guidance to help you understand and master MATLAB.

Assignment Assistance:Facing tight deadlines or complex assignments? We’re here to help! From initial problem analysis to code development and debugging, we offer full-spectrum support to ensure your assignments meet the highest standards.

Project Development: Need help with a research project? Our specialists can assist you in designing and implementing robust MATLAB solutions. We cover everything from project planning and data collection to coding, simulation, and result analysis.

Coursework Support: We provide comprehensive support for your coursework, helping you understand lectures, complete lab exercises, and prepare for exams. Our goal is to ensure you grasp the core principles and practical applications of MATLAB.

Thesis and Dissertation Guidance:Writing a thesis or dissertation? Our experts can assist you in incorporating MATLAB for data analysis, modeling, and simulation. We help you develop a strong methodological framework and ensure your research stands out.

whatsApp order on matlabhelpers.com

telegram order on matlabsolutions.com