heat.py # Calculate heat diffusion for timestep in range (5): for r in range (1, size-1): for c in range (1, size-1 ) b2 [r, c] Fundamentals Lecture (b[r-1, c-1] *0.1 + b[r-1, c) *0.1 + b[r-1,c+i] 0.1 + b[r, c-11*0.1 + b[r,c] *0.2 + b[r, c+1] *0.1 for i in range (size): b2 [1,0] = 10 bb2.copy () plt.title('Heat Diffusion Simulation') plt.imshow (b2, cmap-plt.cm.hot) plt.colorbar () plt.show() + b[r+1, c-1]*0.1 + b[r+1, c) *0.1 + b[r+1, c+1] *0.1) heat.py # Calculate heat diffusion for timestep in range (5): for r in range (1, size-1): Heat Diffusion Simulation for c in range (1, size-1 ): b2 [r,c] Heat Diffusion Simulation (blr-1, c-11*0.1 + b[r-1,c] 0.1 + b[r-1,c+i] 0.1 + b[r,c-i1*0.1 + b[r,c] *0.2 + b[r, c+1]*0.1 for i in range (size): 10 b2 [1,0] bb2.copy() + b[r+1,c-11*0.1 + b[r+1,c] 0.1 + b[r+1,c+1] *0.1) plt.title('Heat Diffusion Simulation') plt.imshow (b2, cmap-plt.cm. hot, interpolation='bilinear') plt.colorbar () plt.show() 27 27/5
heat.py # Calculate heat diffusion for timestep in range (5): for r in range (1, size-1): for c in range (1, size-1 ) b2 [r, c] Fundamentals Lecture (b[r-1, c-1] *0.1 + b[r-1, c) *0.1 + b[r-1,c+i] 0.1 + b[r, c-11*0.1 + b[r,c] *0.2 + b[r, c+1] *0.1 for i in range (size): b2 [1,0] = 10 bb2.copy () plt.title('Heat Diffusion Simulation') plt.imshow (b2, cmap-plt.cm.hot) plt.colorbar () plt.show() + b[r+1, c-1]*0.1 + b[r+1, c) *0.1 + b[r+1, c+1] *0.1) heat.py # Calculate heat diffusion for timestep in range (5): for r in range (1, size-1): Heat Diffusion Simulation for c in range (1, size-1 ): b2 [r,c] Heat Diffusion Simulation (blr-1, c-11*0.1 + b[r-1,c] 0.1 + b[r-1,c+i] 0.1 + b[r,c-i1*0.1 + b[r,c] *0.2 + b[r, c+1]*0.1 for i in range (size): 10 b2 [1,0] bb2.copy() + b[r+1,c-11*0.1 + b[r+1,c] 0.1 + b[r+1,c+1] *0.1) plt.title('Heat Diffusion Simulation') plt.imshow (b2, cmap-plt.cm. hot, interpolation='bilinear') plt.colorbar () plt.show() 27 27/5
Programming Logic & Design Comprehensive
9th Edition
ISBN:9781337669405
Author:FARRELL
Publisher:FARRELL
Chapter6: Arrays
Section: Chapter Questions
Problem 17RQ
Related questions
Question
Explain how first graph Changes to the second and then third graph.
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by step
Solved in 4 steps with 2 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage
Programming Logic & Design Comprehensive
Computer Science
ISBN:
9781337669405
Author:
FARRELL
Publisher:
Cengage