If you have the Signal Processing Toolbox, use the db2mag function.
If you do not have it:
dB2mag = @(dB) 10.^(dB/20);
Since MATLAB is case-sensitive, the ‘dB2mag’ anonymous function will not overshadow any of the db2mag functions in the Toolboxes. (The exp function will not work in this instance, since decibels are defined in terms of base-10 logarithms.)