I have a system of equations, about 3 equations, that I need to plot that are dependent on 2 variables, R and z. But one of the equations is R={constant value}. Here's the code:
R = 0:.1:500;
z = 5./R;
z2 = 40./R;
z3 = 20
plot(R, z, R, z2, R, y3)
...I don't really know how to get z3 to show up as a vertical line. Any ideas?
z3not showing up is because it has different size withR. Inplotcommand two vectors must share the same length.A simple solution is:
Notice here
0is excluded for otherwisemaxwill give anInf.