How to make a contour plot with data from using ode45
Mostrar comentarios más antiguos
So for my code im trying to vary two parameters used in a system of differential equations and evaluate how those different values affect a subset of the solution. I want to do this by creating a contour plot, but I cant seem to get my data to ailgn correctly.
X= linspace(1,5,5); % Vector for alpha_p values
Y= linspace(0.5,3,5); % Vector for beta_p values
[A, B]= meshgrid(X,Y);
for i= 1:length(A)
for j=length(B)
[t,x] = ode45(@(t,x) pulsegenerator_function2(t, x, 1, 5, 0.75, A(i,j), B(i,j), 5,...
0.75, A(i,j), B(i,j), 1, 2, 0.75, A(i,j), B(i,j), 3, 1, 2, 1 ), linspace(0,10,75), [0.1 0 0 0 0 0]);
so this is what I have right now, essentially I have a bunch of paramenters (as you can see after t and x in the function) and I'm trying to vary 2 of them at all possible combnations with each other and i dont know how to successfully do that.
After this issue I still dont understand how I can get the right size data to work for making a contour plot, but it might have to do with this first part so thats the most pressing issue at the moment
2 comentarios
madhan ravi
el 1 de Ag. de 2020
What do you want your z axis to be?
Binette Wadda
el 1 de Ag. de 2020
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Ordinary Differential Equations en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!