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

Simulink Modeling and Simulation:Simulink is an essential tool for modeling and simulating dynamic systems. We excel in creating detailed Simulink models to simulate various physical systems, control systems, and dynamic processes.

Image and Video Processing:Handling tasks like image enhancement, segmentation, object detection, and video analysis can be complex. Our experts, with a strong background in computer vision and image processing, manage these assignments proficiently.

Numerical Methods and Solving Differential Equations:Tackling complex systems of differential equations and implementing numerical methods, such as finite element analysis or finite difference methods, requires advanced Matlab skills and a deep understanding of numerical techniques.

Machine Learning Projects: Implementing machine learning algorithms, developing predictive models, and managing large datasets can be challenging. Our team is skilled in using Matlab's machine learning toolboxes and libraries to handle complex machine learning assignments.

Control Systems Design and Analysis:Designing controllers, analysing system stability, and optimizing control systems demand expertise in control theory and Matlab. Our experts, with a strong background in control systems engineering, excel in these tasks.

Optimization and Genetic Algorithms:Solving optimization problems and using genetic algorithms to find the best solutions from vast search spaces is our forte. Our team has extensive experience with Matlab's optimization capabilities and genetic algorithm toolboxes.

GUI Development:Developing user-friendly Graphical User Interfaces (GUIs) for Matlab applications requires a blend of programming skills and user interface design knowledge. We create interactive and intuitive GUIs tailored to specific requirements.

whatsApp order on matlabhelpers.com

telegram order on matlabsolutions.com