"Data must be a single input of y-values or one or more pairs of x- and y-values" is the error I am getting. I want a 3d plot with V as the X-axis, T as the Y-axis, and P as the Z-axis.
clcclearR = 8.31;T = linspace(273, 473);V = linspace(0.0005, 0.002, 100);n = 1;P = zeros(0, 100);for i = 1:length(T) P(i) = (n.*R.*T(i))./(V(i)); n = n+1;endplot(V, T, P)xlabel('Volume (m^3)')ylabel('Temp (K)')zlabel('Variant of Pressure (Pa)')title('Ideal Gas Law')
Best Answer