Question
Why don't show me the graph? Check the error import numpy as np import matplotlib.pyplot as plt #Main Function def fmain(x1=100,x2=50,x3=20,**kwargs): ro=np.linespace(1.e-5,1,501) c=np.zeros(len(ro)) #calculate and
Why don't show me the graph? Check the error
import numpy as np import matplotlib.pyplot as plt
#Main Function
def fmain(x1=100,x2=50,x3=20,**kwargs): ro=np.linespace(1.e-5,1,501) c=np.zeros(len(ro)) #calculate and plot profile for x1 c=(1/ro)*np.sinh(x1*ro)/np.sinh(x1) plt.plot(ro,c,'_',linewidth=1.5, color='b') hold('on') #calculate and plot profile for x2 c=(1/ro)*np.sinh(x2*ro)/np.sinh(x2) plt.plot(ro,c,'_',linewidth=1.5, color='r') #calculate and plot profile for x3 c=(1/ro)*np.sinh(x3*ro)/np.sinh(x3) plt.plot(ro,c,'_',linewidth=1.5, color='k') #plot axes matplotlib.rcParams.update({'font.size': 12}) plt.xlabel(r'Dimensionaless radius') plt.ylabel(r'Dimensionaless concentration') plt.title('first order reaction') plt.axis([0.,1.,0.0,1.0]) plt.show()
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started