Skip to main content

Math typing

Use shortcuts to make fractions and superscript

  • Ctrl+/ makes fraction
  • Ctrl+7 makes superscript (power)
  • Ctrl+2 makes squareroot
Download original notebook

For typing integrals and etc, use Special Symbols from the command bar at the top.

an example from above

ϵ + (*FB[*)(((*SpB[*)Power[A(*|*),(*|*)2](*]SpB*) γ)(*,*)/(*,*)((*SpB[*)Power[ω0(*|*),(*|*)2](*]SpB*) - (*SpB[*)Power[ω(*|*),(*|*)2](*]SpB*) + I γ ω))(*]FB*) /. {ϵ -> 1, A -> 1, γ -> 2, ω0 -> 0};

Plot[% // ReIm // Evaluate, {ω, -10,10}, ImageSize->500]
(*VB[*)(FrontEndRef["add373d2-6545-4da9-bc17-d02155645966"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKJ6akGJsbpxjpmpmamOqapCRa6iYlG5rrphgYGZqampmYWpqZAQCEZRUX"*)(*]VB*)

Fitting using Lorentz oscillator model

Let us use the simples possible approach to fit it

define out material parameters

dielectric[ω_, ϵ_, ω0_, γ_, A_] := ϵ + (*FB[*)(((*SpB[*)Power[A(*|*),(*|*)2](*]SpB*) γ)(*,*)/(*,*)((*SpB[*)Power[ω0(*|*),(*|*)2](*]SpB*) - (*SpB[*)Power[ω(*|*),(*|*)2](*]SpB*) + I γ ω))(*]FB*);

n[ω_, params__] := (*SqB[*)Sqrt[dielectric[ω, params]](*]SqB*)
R[ω_, params__] := (*SpB[*)Power[Abs[(*FB[*)((n[ω, params] - 1.)(*,*)/(*,*)(n[ω, params] + 1.))(*]FB*)](*|*),(*|*)2](*]SpB*)

Now let's see how it fits our data

experiment = Select[(*VB[*)(Get[FileNameJoin[{".iconized", "iconized-dd15.wl"}]])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRAeH5DwTM7Py6xKdcvMSXXKr8gU0OBhAADq+Qq5"*)(*]VB*), (#[[1]] > 3000 && #[[1]] < 4000)&];

model = NonlinearModelFit[experiment, R[ω, ϵ, ω0, 10, A], {{ϵ, 4}, {ω0, 3500}, {γ,100}, {A,100}}, ω];

Plot[
  model[x], {x, 3000,4000}, 
  
  Epilog->{Red, Point[experiment]}, 
  PlotRange->Full,
  ImageSize->500
]
(*VB[*)(FrontEndRef["d13694ae-47ca-49a1-b477-867ff2b03580"])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRCeEJBwK8rPK3HNS3GtSE0uLUlMykkNVgEKpxgam1maJKbqmpgnJ+qaWCYa6iaZmJvrWpiZp6UZJRkYm1oYAACCFxVL"*)(*]VB*)

Now we can save our plot to be used for later

% // Iconize 
(*VB[*)(Get[FileNameJoin[{".iconized", "iconized-5fec.wl"}]])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRAeH5DwTM7Py6xKdcvMSXXKr8g8cJyRAQDvgAv9"*)(*]VB*)
model // Iconize 
(*VB[*)(Get[FileNameJoin[{".iconized", "iconized-c831.wl"}]])(*,*)(*"1:eJxTTMoPSmNkYGAoZgESHvk5KRAeH5DwTM7Py6xKdcvMSXXKr8iUmMTIAADsQQsg"*)(*]VB*)

Entering Matrixes

One can also operate with matrixes and multiply them like normal. Try MatrixForm or use a snippet tool Ctrl/CMD+P and locate Insert Matrix helper widget

((*GB[*){{1(*|*),(*|*)0(*|*),(*|*)0}(*||*),(*||*){0(*|*),(*|*)a(*|*),(*|*)0}(*||*),(*||*){0(*|*),(*|*)0(*|*),(*|*)1}}(*]GB*)).((*GB[*){{0(*|*),(*|*)0(*|*),(*|*)1}(*||*),(*||*){1(*|*),(*|*)0(*|*),(*|*)1}(*||*),(*||*){1(*|*),(*|*)0(*|*),(*|*)0}}(*]GB*)) // MatrixForm

Greek letters

To enter Greek's symbols use ESC key and type the first letter. The autocomplete will suggest the corresponding letter

α, β, γ

Special symbols

To enter integral, sums one can use Special Characters toolbox