Plotting 3D graph with ODEs
11 views (last 30 days)
Show older comments
Hello there, I am looking for a possible way to plot 3D surface/graphs/plot from the data set I get from a system of ODEs that I created and solved using ode45, but I am unsure of how to get it.
Lets say I have the function files of the system of ODEs,and each time I run, I manipulate the parameters one by one to see their effect on the ans I get. For eg, I started off with the parameter A=0, and B = 3, which allows me to get population(t). Then I changed one of the parameter each time, A = 0, 20, 40, 60, 80 100 respectively. For each value of A, I also changed the B= 3, 6, 9, 12. respectively. Isit possible for me to plot a combined 3D plot of A, B and the population(t) and is there a better way/less tedious way to program this? If so, what is the suggested steps that I should take or do?
Thanks in advance!
0 Comments
Answers (1)
J. Alex Lee
on 21 Aug 2020
If your ODE result "population(t)" a scalar value, then yes, you can use surf() if your [A,B] is defined using meshgrid.
5 Comments
J. Alex Lee
on 21 Aug 2020
In a 3D plot, you have available 3 coordinates, x,y,z. You are using up (x,y) with your A and B values. You can represent a "point" at that (x,y) with another single value z. How do you expect a plot to look if you want multiple values of z stacked onto each other at that single (x,y)? Even if you did do that, how would you interpret the interrelation among those multiple stacked points (their relation in time, e.g.)?
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!