From f866a0ff5296f74162ff09d5cb523bd2ebc8a81b Mon Sep 17 00:00:00 2001 From: Thomas Lambert <dev@tlambert.be> Date: Wed, 15 Mar 2023 13:43:58 +0100 Subject: [PATCH] feat(utils): add sine spacing --- +af_tools/+utils/spacedvector.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/+af_tools/+utils/spacedvector.m b/+af_tools/+utils/spacedvector.m index ecf48e3..d0a7d34 100644 --- a/+af_tools/+utils/spacedvector.m +++ b/+af_tools/+utils/spacedvector.m @@ -1,7 +1,7 @@ function vect = spacedvector(spacing, nPoints) % SPACEDVECTOR Returns a vector based on chosen spacing and number of points % ----- - % (c) Copyright 2022 University of Liege + % (c) Copyright 2022-2023 University of Liege % Author: Thomas Lambert <t.lambert@uliege.be> % ULiege - Aeroelasticity and Experimental Aerodynamics % Apache 2.0 License @@ -18,6 +18,9 @@ function vect = spacedvector(spacing, nPoints) case 'cosine' beta = linspace(0, pi / 2, nPoints); vect = 1 - cos(beta); + case 'sine' + beta = linspace(0, pi / 2, nPoints); + vect = sin(beta); end end -- GitLab