Plotting 3D graph with ODEs

2 次查看(过去 30 天)
Clement Koh
Clement Koh 2020-8-21
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!

回答(1 个)

J. Alex Lee
J. Alex Lee 2020-8-21
If your ODE result "population(t)" a scalar value, then yes, you can use surf() if your [A,B] is defined using meshgrid.
  5 个评论
J. Alex Lee
J. Alex Lee 2020-8-21
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.)?
Clement Koh
Clement Koh 2020-8-21
Alright, thanks for the input!

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by