How to realize Riemann Siegel Theta Function with MATLAB?

P
petter · Dec 12, 2020 · 2K views
Question
How to realize Riemann Siegel Theta Function with MATLAB?
Expert Answer
Profile picture of John Michell
John Michell PhD Expert
Answered Aug 24, 2026

However in MATLAB, the gamma function seems to be defined only for a real variable, unless you use the symbolic toolbox version of gamma. So this should work:

 

t = (1:5)';
[t,angle(double(gamma(sym(1/4 + i*t/2)))) - log(pi)/2*t]
ans =
                         1         -1.76754795281229
                         2         -2.52591091881613
                         3         -2.99456469601083
                         4         -3.29063503121648
                         5         -3.45962037536346

That is valid for real arguments t. I'd need to do some reading to know if this works for complex arguments, though I assume it does not, since I gave indicates it is valid for real arguments. Hopefully you care only about real arguments, and are uninterested in an extension to the complex plane.

100% Run Guarantee 3-Hour Fast-Track Delivery

Need a Custom Version or Complete Simulation for This Problem?

Our 500+ PhD engineers build, debug, and optimize working MATLAB scripts and Simulink (.slx) models tailored to your exact assignment rubrics with zero plagiarism.

Tested on MATLAB R2024b / R2026a
Turnitin 0% Plagiarism Report
Free 7-Day Revisions Guarantee
Have a different question? Ask here

Get a Free Consultation or a Sample Assignment Review!