I have created a function to do Newton-Raphson method on a gas law problem. Supposedly, you enter pressure, temperature, and receive the specific volume as a result. Unfortunately, I only seem to be receiving one of my constants as the output. I can't seem to find where I went wrong. Any help?
w= (p + a./q.^2)/(r*t) + (2*a.*(b - q))/(r*t.*q^3);