Plotting a 2D "Time Snapshot"
3 views (last 30 days)
Show older comments
Hello. I am having trouble plotting a 2D "time snapshot" of a solution to a parabolic heat equation. The mesh plot seen near the bottom of my code works like a charm. However, I am supposed to try and plot a 2D "time snapshot" at time t = 20, so essentially just taking a slice of my 3D mesh. I am unsure how to do this. I have tried numerous things and nothing seems to be working. One of my classmates was able to use plot(:,401); to get his to work, where 401 is the final n iterate. This does not seem to work for me though. I get an error about an undefined function or variable with plot. From what I can tell, it does not like the semi-colon. I am not sure why this is a problem for me and not him, as our code is essentially the same. If anyone is able to show me how to make this 2D plot I would greatly appreciate it. A photo of my code is below:

3 Comments
Accepted Answer
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!