File Exchange

image thumbnail


version (2.79 KB) by Alexander Laut
Optimizes domain distribution x for y=f(x) for efficient shape representation

1 Download

Updated 23 Jan 2018

View License

When exporting complex curves with regions of interest and others without, it becomes useful to adaptivley query the domain of the function as opposed to evenly distributing the point density via linspace. When adaptivley adjusting the spacing of the representative domain, fewer points can be used as opposed to an evenly distributed domain for equivalent representation.
In the example, the curve sin(x) is fairly linear about x=0 and accordingly fewer points are sample along this region whereas at x = +/- pi/2, more points are samples to account for the curvature.

Cite As

Alexander Laut (2020). varspace(funx,xmin,xmax,numx,varargin) (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (0)


Replaced function ends.m with equivalent from standard library.

Published plot of example useage

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