Skip to content
Snippets Groups Projects
Unverified Commit f866a0ff authored by Thomas Lambert's avatar Thomas Lambert
Browse files

feat(utils): add sine spacing

parent ec8f9f9b
No related branches found
No related tags found
No related merge requests found
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment