LINSPACE3: linearly spaced vector defined by three points

버전 1.1.0.0 (1.79 KB) 작성자: Sky Sartorius
Generate a vector as linearly spaced as possible while still including three defined points.
다운로드 수: 682
업데이트 날짜: 2014/11/20

라이선스 보기

LINSPACE3 linearly spaced vector including a defined middle point.
LINSPACE3(X1, X2, X3) generates a row vector of 100 points between X1 and X3 as linearly spaced as possible such that the vector contains X2.

LINSPACE3(X1, X2, X3, N) generates a row vector of N points.

[V, IND] = LINSPACE3(...) also returns the index, IND, of X2 in the vector.

LINSPACE3 will always contain X1, X2, and X3 without repeating an element.

For N < 3, LINSPACE3 returns the shortest possible vector containing all of X1, X2, and X3. This is normally [X1 X2 X3]. However, if X1=X2 or X2=X3, LINSPACE3 returns [X1 X3].

One use of LINSPACE3 is, for example, in generating points to evaluate in a sensitivity study where one decision variable, at a certain point (X2), is also restricted by bounds (X1, X3).

인용 양식

Sky Sartorius (2024). LINSPACE3: linearly spaced vector defined by three points (https://www.mathworks.com/matlabcentral/fileexchange/28553-linspace3-linearly-spaced-vector-defined-by-three-points), MATLAB Central File Exchange. 검색됨 .

MATLAB 릴리스 호환 정보
개발 환경: R2007b
모든 릴리스와 호환
플랫폼 호환성
Windows macOS Linux
카테고리
Help CenterMATLAB Answers에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!
버전 게시됨 릴리스 정보
1.1.0.0

Added output of the index of X2

1.0.0.0