Blank screen when plotting a graph and how to partial differentiate?

2 views (last 30 days)
p_RK = @(v,T) (R*T*(1/(v-b) - a/(R*T^1.5*v*(v+b)))) % The redlich kwong equation
How can I partiall differentiate this function with respect to v?
Also plotting this seems to work for the pressure coefficient
alphav = @(v) ((R/(v-b)+a/(2*T^1.5*v*(v+b)))/p_RK_T(v))
% plot alpha_v over the required range
figure
fplot(alphav, [v1 v2])
hold on
but when I try plotting this I get a blank screen:
diffp_volume=@(v) (((-R*T)/(v^2-b))+(a*(2*v+b)/(v^2*T^1/2*(v+b)^2)))
kt = @(v) -1/diffp_volume*v
% plot alpha_p over the required range
figure
fplot(kt, [v1 v2])
hold on
What can I do? Also I can send the whole code if this doesnt make sense
Thanks
As a note this is about thermodynamics on plotting the coefficient of thermal expansion

Answers (0)

Categories

Find more on Thermodynamics and Heat Transfer in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!