I would like to plot following mathematical modell of the p-V-diagramm
However, when I try to plot the function I get a different plot.
T0 = 492
V0 = 275
Tmax = 25
Vmax = 75
vals = []
for t in range(1,stop=2*π,length=30)
push!(vals, (T0 + Tmax*sin(t))/(V0-Vmax*cos(t)))
end
plot(vals, legend=nothing)
I am not sure if I am using plots right.
reference:
julia> T0 = 492
julia> V0 = 275
julia> Tmax = 25
julia> Vmax = 75
julia> using Plots
julia> V(t) = V0-Vmax*cos(t)
V (generic function with 1 method)
julia> P(t) = (T0 + Tmax*sin(t))/V(t)
P (generic function with 1 method)
julia> plot(V, P, 0:0.1:2pi)