MATLAB: There is something wrong in R.

formula

clc;
clear all;
close all;
c=3*10.^8;
h=6.625*10.^-34;
k= 1.38*10.^-23;
T=500;
f=[1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
R= ((2.*h).*(f.^3))./((c.^2).*(exp.^(h.*f/(k.*T))-1));
plot(f,R)

Best Answer

The problem is in the way you call the exp function.
This works:
R = ((2.*h).*(f.^3))./((c.^2).*(exp(h.*f/(k.*T))-1));
.