File Exchange

image thumbnail

Interpolate Points on a Shape (interpolate_shape)

version 1.0.1 (252 KB) by Tamas Kis
Increases the number of points defining a shape by placing uniformly spaced points between existing points.

3 Downloads

Updated 10 Jun 2021

From GitHub

View Version History

View license on GitHub

interpolate_shape

Increases the number of points defining a shape by placing uniformly spaced points between existing points.

Syntax

[x_new,y_new] = interpolate_shape(x,y,n)

Description

[x_new,y_new] = interpolate_shape(x,y,n) returns a new set of points stored in the vectors x_new and y_new given an original set of points stored in the vectors x and y. The new set of points has n points evenly spaced between the points stored in x and y. The new set of points also includes the original points stored in x and y.

Examples and Additional Documentation

Cite As

Tamas Kis (2021). Interpolate Points on a Shape (interpolate_shape) (https://github.com/tamaskis/interpolate_shape-MATLAB/releases/tag/v1.0.1), GitHub. Retrieved .

Comments and Ratings (1)

Stephen Cobeldick

That is an interesting definition of "uniformly spaced": the spacing is different for each line segment!

You might be interested in this general solution which actually provides uniform spacing over the *entire* line and supports different interpolation methods: https://www.mathworks.com/matlabcentral/fileexchange/34874-interparc

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!