scalesequence
by Tim C. Lueth, SG-Lib Toolbox: SolidGeometry 5.6 - Auxiliary function
Introduced first in SolidGeometry 5.1, Creation date: 2021-04-16, Last change: 2025-09-15
returns a streched sequence between an minimal and maximal value
Description
seemed to be simple, but the exception cases are more complex, so it makes to have an own function
See Also: mod1circsequ
Example Illustration
Syntax
y=scalesequence(x,n,[usemean])
Input Parameter
x: | | value sequence - only first and last values are used |
n: | | number of desired values |
usemean: | | use mean value if n==1 and numel(unique(x))>1; default is false |
Output Parameter
y: | | new sequence as [1 x n] row vector |
Examples
scalesequence([3 4],1)
scalesequence([3 4],2)
scalesequence([3 4],3)
a=[ 3 4 5 6], b = [7 9], [scalesequence(a,max(numel(a),numel(b))); scalesequence(b,max(numel(a),numel(b)))]
Copyright 2021-2025 Tim C. Lueth. All rights reserved. The code is the property of Tim C. Lueth and may not be redistributed or modified without explicit written permission. This software may be used free of charge for academic research and teaching purposes only. Commercial use, redistribution, modification, or reverse engineering is strictly prohibited. Access to source code is restricted and granted only under specific agreements. For licensing inquiries or commercial use, please contact: Tim C. Lueth
Last html export of this page out of FM database by TL: 2025-09-21