I am writing a lab report for a class. I want to redefine \section so that \section{Analysis} has the same output that \section*{\centering Analysis} would normally have. I tried
\renewcommand{\section}[1]{\section*{\centering #1}}
but this causes an error. I am able to do
\newcommand{\newsection}[1]{\section*{\centering #1}}
to define a new command to do this, but it would be ideal if I could use the same \section command. I've seen several other questions about similar topics, but I don't understand the code so I can't quite adapt it to my example. My code would be something like this:
\documentclass{article}
% redefine the command
\begin{document}
blah blah blah
\section{Analysis}
blah blah blah
\end{document}
Any help (regarding commands or any other aspects of my code that you find inappropriate) is appreciated.

\section*is not actually a command. The*in your input is treated as an optional first argument to the\sectioncommand. You can demonstrate that by seeing what happens if you input\section * {my section title}with spaces either side of the*. – alephzero Oct 27 '18 at 18:52