Plotting a 2D "Time Snapshot"
조회 수: 4 (최근 30일)
이전 댓글 표시
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
채택된 답변
추가 답변 (0개)
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!