image thumbnail

Linearly Scale Data Between Two Points (scale_data)

version 2.0.3 (62.2 KB) by Tamas Kis
Linearly scales data to start and end between specified points.

13 Downloads

Updated 28 Aug 2021

From GitHub

View license on GitHub

scale_data View scale_data-MATLAB on File Exchange

Linearly scales data to start and end between specified points.

Syntax

[x_new,y_new] = scale_data(x,y,[x1,y1],[x2,y2])

Description

[x_new,y_new] = scale_data(x,y,[x1,y1],[x2,y2]) scales the data stored in x and y so that the first data point now lies at (x1,y1), the last data point now lies at (x2,y2), and all the "interior" data points are linearly scaled between these two points. The scaled data is returned in the vectors x_new and y_new.

Examples

See "EXAMPLES.mlx" or the "Examples" tab on the File Exchange page for examples.

Cite As

Tamas Kis (2021). Linearly Scale Data Between Two Points (scale_data) (https://github.com/tamaskis/scale_data-MATLAB/releases/tag/v2.0.3), GitHub. Retrieved .

MATLAB Release Compatibility
Created with R2021a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

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

Start Hunting!
To view or report issues in this GitHub add-on, visit the GitHub Repository.
To view or report issues in this GitHub add-on, visit the GitHub Repository.