Note Ans
Note Ans
c = array([[2,1],[3,4]])
b = array([[-1,3],[4,5]])
print (c+b)
print (c-b)
print (c*b)
print (c.transpose())
p=b.transpose()
print(A[0,:])
print(A[2,:])
print(A[:,0])
print(A[:,1])
A= [[2,3],[-4,9]]
b= [5,7]
x = solve(A,b)
print (x[0])
print (x[1]).
3 solution
# A= [[-1,3,4,5],[0,3,0,-5],[4,0.5,0,3],[9,-3,4,0]]
b= [4,7,5,-3]
x= solve(A,b)
print('X=', x[0])
print('Y=', x[1])
print('Z=', x[2])
print('P=', x[3]).
def f(x):
return x**3 - x**2 - 1
x = linspace(-10, 2, 50)
plt.plot(x, f(x))
plt.axhline(color= 'b').
#plt,axyline(x=root, color='k').
def f(x):
return x**3 - x**2 - 1
x= fsolve(f,2)
print (x).