0
$\begingroup$

I want to use the Rayleigh criterion to find the resolution of an optical system. I have two functions f1 = Sinc[x]^2 and f2 = Sinc[x-T]^2, T being the translation. I want to change the value of T until the first minimum of f2 coincides with the maximum of f1 (Rayleigh criterion). That being achieved, the value x and T should be returned.

Pseudocode:

  • for x=100 translate T until the first minimum of f2 coincides with the peak of f1; print {x, T}
  • repeat the same procedure for x=105 ... up to x=200.

So, what I would like to do is basically start the program and generate a table with the values x and T.

$\endgroup$
4
  • $\begingroup$ Welcome to Mathematica.SE! I think you would find it useful to review the documentation and basic tutorials. Mathematica uses square brackets for functions so your f1 and f2 definitions have the wrong syntax. Also, it is not good practice to use uppercase single letters to name expressions as they can clash with built-in functions. Try using lower case f instead. $\endgroup$
    – Verbeia
    Commented Jan 16, 2013 at 11:59
  • $\begingroup$ Just find the distance between the max and min ... $\endgroup$ Commented Jan 16, 2013 at 12:07
  • 3
    $\begingroup$ The Rayleigh criterion is for the first zero (not the first minimum) of f2 to coincide with the maximum of f1. $\endgroup$ Commented Jan 16, 2013 at 13:01
  • $\begingroup$ Oops, I just noticed that you were using $sinc(x)^2$, in which case the first minimum and first zero are the same thing. $\endgroup$ Commented Jan 23, 2013 at 17:12

1 Answer 1

4
$\begingroup$

You may do it the smart way just looking at the distance between max and min, but anyway this is the procedure for doing what you asked for

Maximize[Sinc[x - t /. (NMinimize[Sinc[t]^2, t][[2]])]^2, x]

{1., {x -> -3.14159}}

Edit

Plot[{Sinc[x]^2, Sinc[x - t /. (NMinimize[Sinc[t]^2, t][[2]])]^2}, {x, -10, 10}, Evaluated -> True]

Mathematica graphics

$\endgroup$
9
  • $\begingroup$ Hi, I have two functions Sinc[x1] and Sinc[x2-T], x100=1, x2 =200, T a real number; Pseudocode: for x=100 translate T till the first min of f2 coincide with peak of f1 print print {x1, T} repeat the same procedure for x=105 That would be all! Thanks in advance everyone $\endgroup$
    – Darwin
    Commented Jan 16, 2013 at 14:49
  • $\begingroup$ @Darwin. Edit your question to add your clarifications. Don't add them as a comment to an answer. $\endgroup$
    – m_goldberg
    Commented Jan 16, 2013 at 18:11
  • $\begingroup$ hi, if i change the question, then anybody reading the thread would not understand the discussion following it $\endgroup$
    – Darwin
    Commented Jan 17, 2013 at 11:04
  • $\begingroup$ @Darwin The usual procedure is leaving the existing question as it is now and add modifications at the end (after an edit title) $\endgroup$ Commented Jan 17, 2013 at 11:11
  • 1
    $\begingroup$ +1 for trying to answer a moving-target question. $\endgroup$
    – Jens
    Commented Jan 17, 2013 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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