I have the following function in R:
n<- function(theta){
d=theta[1]
z=theta[2]
Nh= c(1819, 1018)
N= sum(Nh)
sigmah= c(0.013, 0.0155)
n=sum(Nh*sigmah)^2/(N^2*d^2/z^2+sum(Nh*sigmah^2))
return(n)
}
I would like to plot the function n over a range of inputs for d and z. How could I do this? Thanks