plotting a transient solution

9 views (last 30 days)
Sudharsan Srinivasan
Sudharsan Srinivasan on 27 Jul 2017
Lets say I have a rectangular domain of length = 500m and height = 100m. I have the computed velocity distribution through the grid say 'v'. clearly, v is a 500 by 100 matrix. I am running the simulation for lets say 5000 time steps. Now, I want to store the value of 'v' from each and every iteration (i.e) from 1 to 5000 and plot the velocity Vs height for different time steps and check how the solution evolves over time. How can I code this ?
  1 Comment
Abhi Sundararaman
Abhi Sundararaman on 1 Aug 2017
When you say you want to store the value of 'v' from each iteration, do you mean each time step has its own corresponding 500x100 matrix? Also, since you want to plot velocity vs height, do you still need the "length" dimension? Do you wish to plot "velocity vs position(height,length) vs time"?
If you just wanted to plot velocity vs height vs time, you could make a 3-d plot using the "surf" function.
When you say you want to check how the solution evolves over time, do you mean you want to see how these 500x100 matrices change over time? Or just how the velocity changes over time with respect to one of the dimensions (length OR height)?

Sign in to comment.

Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!