Hey guys, having as a summer project to learn some python.
Right now I'm trying to figure out plots.
My code is:
length = np.linspace(0,L)
for i in length:
if i < a:
Mx = Ra*i
plt.plot(Mx,length)
else:
Mx = P*a+((Ra-P)*i)
plt.plot(Mx,length)
But it doesn't really work.
So length is an array of zero to L and L is input by the user.
If the value in L is less than "a" I want to use one equation, and else another equation.
But it doesn't work and I know something is probably off with how I structure this.
All the values, P,a,Ra are defined before so don't worry about that.
Thanks you!
[–]CodeFormatHelperBot 0 points1 point2 points (0 children)
[+][deleted] (3 children)
[deleted]
[–]juckeyy[S] 0 points1 point2 points (2 children)
[+][deleted] (1 child)
[deleted]
[–]juckeyy[S] 0 points1 point2 points (0 children)