How to skip a part of y axis in plotting ode code?
I want to plot the solution for the following ode but one variable is far from other variable solutions. so If I was advised to skip a part of y axis to look presentable. I want to skip from 1.5*10^9 to 1.3*10^10 in the y-axis. Is that possible?
clc;
clear;
% Define initial conditions
S0 = 1; S_R0 = 0; C0 = 0; C_R0 = 0; M10 = 85000; M20 = 15000; T_H10 = 71000; T_H20 = 12000; T_C0 = 56000; T_REG0 = 8000; IL100 = 0.0085; IFNG0 = 0.12; IL20 = 0.0094;
y0 = [S0, S_R0, C0, C_R0, M10, M20, T_H10, T_H20, T_C0, T_REG0, IL100, IFNG0, IL20];
% Define time span
tspan = [0 8000];
% Solve the system using ode23
[t, y] = ode45(@odes, tspan, y0);
% Plot the results
figure
plot(t, y(:,1), t, y(:,2),t, y(:,3),t, y(:,4),t, y(:,5),t, y(:,6),t, y(:,7),t, y(:,8),t, y(:,9),t, y(:,10),”)
legend({‘S’, ‘S_R’, ‘C’, ‘C_R’, ‘M1’, ‘M2’, ‘T_{H1}’, ‘T_H2’, ‘T_C’, ‘T_{REG}’});
xlabel(‘Time(days)’)
xlim([0 800])
ylabel(‘Cell Density(cells/ml)’)
%title([‘Solution of ODE System’])
grid on
figure
plot(t, y(:,11), t, y(:,12),t, y(:,13))
legend({‘IL10’, ‘IFNG’, ‘IL2’});
xlabel(‘Time(days)’)
xlim([200 800])
ylabel(‘Variables’)
% title(‘Solution of ODE System’)
grid onI want to plot the solution for the following ode but one variable is far from other variable solutions. so If I was advised to skip a part of y axis to look presentable. I want to skip from 1.5*10^9 to 1.3*10^10 in the y-axis. Is that possible?
clc;
clear;
% Define initial conditions
S0 = 1; S_R0 = 0; C0 = 0; C_R0 = 0; M10 = 85000; M20 = 15000; T_H10 = 71000; T_H20 = 12000; T_C0 = 56000; T_REG0 = 8000; IL100 = 0.0085; IFNG0 = 0.12; IL20 = 0.0094;
y0 = [S0, S_R0, C0, C_R0, M10, M20, T_H10, T_H20, T_C0, T_REG0, IL100, IFNG0, IL20];
% Define time span
tspan = [0 8000];
% Solve the system using ode23
[t, y] = ode45(@odes, tspan, y0);
% Plot the results
figure
plot(t, y(:,1), t, y(:,2),t, y(:,3),t, y(:,4),t, y(:,5),t, y(:,6),t, y(:,7),t, y(:,8),t, y(:,9),t, y(:,10),”)
legend({‘S’, ‘S_R’, ‘C’, ‘C_R’, ‘M1’, ‘M2’, ‘T_{H1}’, ‘T_H2’, ‘T_C’, ‘T_{REG}’});
xlabel(‘Time(days)’)
xlim([0 800])
ylabel(‘Cell Density(cells/ml)’)
%title([‘Solution of ODE System’])
grid on
figure
plot(t, y(:,11), t, y(:,12),t, y(:,13))
legend({‘IL10’, ‘IFNG’, ‘IL2’});
xlabel(‘Time(days)’)
xlim([200 800])
ylabel(‘Variables’)
% title(‘Solution of ODE System’)
grid on I want to plot the solution for the following ode but one variable is far from other variable solutions. so If I was advised to skip a part of y axis to look presentable. I want to skip from 1.5*10^9 to 1.3*10^10 in the y-axis. Is that possible?
clc;
clear;
% Define initial conditions
S0 = 1; S_R0 = 0; C0 = 0; C_R0 = 0; M10 = 85000; M20 = 15000; T_H10 = 71000; T_H20 = 12000; T_C0 = 56000; T_REG0 = 8000; IL100 = 0.0085; IFNG0 = 0.12; IL20 = 0.0094;
y0 = [S0, S_R0, C0, C_R0, M10, M20, T_H10, T_H20, T_C0, T_REG0, IL100, IFNG0, IL20];
% Define time span
tspan = [0 8000];
% Solve the system using ode23
[t, y] = ode45(@odes, tspan, y0);
% Plot the results
figure
plot(t, y(:,1), t, y(:,2),t, y(:,3),t, y(:,4),t, y(:,5),t, y(:,6),t, y(:,7),t, y(:,8),t, y(:,9),t, y(:,10),”)
legend({‘S’, ‘S_R’, ‘C’, ‘C_R’, ‘M1’, ‘M2’, ‘T_{H1}’, ‘T_H2’, ‘T_C’, ‘T_{REG}’});
xlabel(‘Time(days)’)
xlim([0 800])
ylabel(‘Cell Density(cells/ml)’)
%title([‘Solution of ODE System’])
grid on
figure
plot(t, y(:,11), t, y(:,12),t, y(:,13))
legend({‘IL10’, ‘IFNG’, ‘IL2’});
xlabel(‘Time(days)’)
xlim([200 800])
ylabel(‘Variables’)
% title(‘Solution of ODE System’)
grid on breakyaxis, breakplot, edit MATLAB Answers — New Questions