function [numberOfPoints] = setNumberOfPoints(accuracy,nPolePairs,Ns)

nPoints = lcm(nPolePairs*2,Ns)/nPolePairs;
if strcmp(accuracy,'Low accuracy')
    numberOfPoints = nPoints*2;
elseif strcmp(accuracy,'Medium accuracy')
    numberOfPoints = nPoints*4;    
elseif strcmp(accuracy,'High accuracy')
    numberOfPoints = nPoints*8;    
else
    warningMessage = string(sprintf('Only Low accuracy, Medium accuracy or High accuracy are valid.\n'));
    error(warningMessage)
end
    
end

