Undefined function or vaariable 'pepper'

General forum for EasySpin: questions, how to's, etc.
Post Reply
bs.srikanth16
Newbie
Posts: 1
Joined: Mon Jan 06, 2020 10:32 pm

Undefined function or vaariable 'pepper'

Post by bs.srikanth16 »

i am using MATLAB 2015a and Easyspin 5.2.27. While running one of the example I am gettig the error,

" Undefined function or variable 'pepper'.

Error in mn_strain (line 22)
[B,spec0] = pepper(Sys,Exp); "

please help me to solve this problem.
Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Undefined function or vaariable 'pepper'

Post by Stefan Stoll »

Make sure to add the easyspin-x.y.z/easyspin folder to your Matlab path, as described in the installation instructions.
anubis_by_itself
Newbie
Posts: 3
Joined: Tue Oct 27, 2020 8:41 am

Re: Undefined function or vaariable 'pepper'

Post by anubis_by_itself »

I thought in order to use pepper you have to use @pepper? Or it is different kind of using?

Stefan Stoll
EasySpin Creator
Posts: 1050
Joined: Mon Jul 21, 2014 10:11 pm
Location: University of Washington

Re: Undefined function or vaariable 'pepper'

Post by Stefan Stoll »

The original error message indicates that MATLAB can't find pepper. This means that the easyspin-x.y.z/easyspin folder is not on the MATLAB search path. You have to add for EasySpin to work.

To do a simulation, just use pepper as shown in the OP. For least-squares fitting, use esfit like this: esfit(@pepper,data,...).

Post Reply