0

I need to build Gaussian pulse in time and frequency domain, as depicted in the figure. I tried tikz library but could not.**Gaussian Impulse [taken from Diagnostic Ultrasound Imaging: Inside Out ]**

  • 1
    It is simply to draw with pgfplots (using groupplot). You just need to use function of Gauss pulse in frequency and time domain. – Zarko Feb 14 at 20:46
  • 1
    Can you add your trial code? – AndréC Feb 14 at 20:52
  • that's the problmem, I could not find the Gaussian Pulse equation for latex. – KrisQ Feb 14 at 21:07
  • 1
    Its my first week working on Latex and programming in general. I know that the question might look silly to most of the readers, but please remember how it was for you in your beginnings. I posted this after I tried my best. I dont find a reason to downvote the question. Nevertheless, Thank you for your help and advides! – KrisQ Feb 15 at 15:14
  • 1
    I can see why you feel that way, (I did not downvote and upvoted to get back to 0. The downvotes on this site are a bit random, and the reasons range from "you dared to give the tick to someone else" to "you did something I do not understand". However, one should also say that you do make it easier to answer the question if you provide some code, regardless of how far you are from achieving what you want to achieve, for two simple reasons: 1. answerers see what document class and packages you are using, so avoid conflicts. 2. it spares answerers from punching in too much text.) – Schrödinger's cat Feb 16 at 0:05
3

This produces a plot that resembles your screen shot.

\documentclass[border=6mm,tikz]{standalone}
\usepackage{pgfplots}
\pgfplotsset{compat=1.16}
\begin{document}
\begin{tikzpicture}[font=\sffamily,/pgfplots/.cd,width=12cm,height=5cm]
\matrix{
 \begin{axis}[xmin=0,xmax=3,ymin=-1,ymax=1,
    title=5MHz Gaussian pulse,xlabel={Time ($\mu$s)},ylabel=Amplitude]
  \addplot[no markers,smooth,samples=201,domain=0:2.5] 
    {exp(-9*(x-1.25)*(x-1.25))*cos((x-1.25)*1440)};
 \end{axis}\\[5mm]
 \begin{axis}[xmin=-10,xmax=10,ymin=0,ymax=1,
    xtick={-10,-5,0,5,10},
    xlabel={Frequency (MHz)},ylabel=Spectral amplitude]
  \addplot[no markers,smooth,samples=201,domain=-10:10] 
    {0.2*exp(-(x-5)*(x-5))+0.2*exp(-(x+5)*(x+5))};
 \end{axis}\\
};
\end{tikzpicture}
\end{document}

enter image description here

You can make it more fancy by using siunitx and/or groupplots.

|improve this answer|||||
  • Thank you very much! After your post it looks very easy. – KrisQ Feb 15 at 15:03

Not the answer you're looking for? Browse other questions tagged or ask your own question.