필터 지우기
필터 지우기

why this equation is not ploting

조회 수: 1 (최근 30일)
shiv gaur
shiv gaur 2022년 4월 1일
댓글: shiv gaur 2022년 4월 3일
Tstart = 100;
Tend = 1000.0;
Nt = 2000;
dT = (Tend-Tstart)/Nt;
X0 = 0.3;
Y0 = 0;
Z0 = 0;
N = 20;
k1=1;
k2=2.52;
k3=1;
k4=5;
I=1.5;
s=4;
xr=-1.6;
r=0.01;
T = zeros(Nt+1,1);
X = zeros(Nt+1,1);
Y = zeros(Nt+1,1);
Z = zeros(Nt+1,1);
a = zeros(N+1,1);
b = zeros(N+1,1);
c = zeros(N+1,1);
T(1) = 0.0;
X(1) = X0;
Y(1) = Y0;
Z(1) = Z0;
for j = 2:Nt+1
a(1) = X(j-1);
b(1) = Y(j-1);
c(1) = Z(j-1);
for k = 1:N
a(k+1)=(b(k)-k1*a(k).^3+k2*a(k).^2-c(k)+I)/(k+1);
b(k+1)=(k3-k4*a(k).^2-b(k))/(k+1);
c(k+1)=r*(s*(a(k)-xr)-c(k))/(k+1);
end
x = a(1);
y = b(1);
z = c(1);
for k = 2:N+1
x = x + a(k)*dT^(k-1);
y = y + b(k)*dT^(k-1);
z = z + c(k)*dT^(k-1);
end
T(j) = T(j-1) + dT;
X(j) = x;
Y(j) = y;
Z(j) = z;
end
plot(T,X)
It's not showing the plot! How do I resolve this?
  댓글 수: 2
Image Analyst
Image Analyst 2022년 4월 1일
It works for us.
shiv gaur
shiv gaur 2022년 4월 1일
편집: Walter Roberson 2022년 4월 1일
why this is not like that pl match with equation very famous hind marsh

댓글을 달려면 로그인하십시오.

답변 (1개)

Sam Chak
Sam Chak 2022년 4월 1일
편집: Walter Roberson 2022년 4월 1일
Simulating the Hindmarsh–Rose model requires solving the differential equations using some numerical ode solvers. You can change the parameters in the code below for your study. If you find my Answer is helpful, please vote and Accept.
function Hindmarsh_Rose
close all
clc
tspan = [0 1000]; % time span of simulation
y0 = [-1.5 -10 2]; % initial values
[t, y] = ode45(@(t, y) odefcn(t, y), tspan, y0);
plot(t, y(:,1), 'linewidth', 1.5)
grid on
xlabel('Time, t [sec]')
ylabel('x(t)')
title('Hindmarsh–Rose Neuronal Bursting Model')
end
function dydt = odefcn(t, y) % Ordinary Differential Equations
dydt = zeros(3,1);
a = 1;
b = 3;
c = 1;
d = 5;
I = 2;
r = 0.0021;
s = 4;
xR = -8/5;
dydt(1) = y(2) - a*y(1)^3 + b*y(1)^2 - y(3) + I;
dydt(2) = c - d*y(1)^2 - y(2);
dydt(3) = r*(s*(y(1) - xR) - y(3));
end
Result:
  댓글 수: 17
shiv gaur
shiv gaur 2022년 4월 2일
sir you have all the things equation papers so you are req to resolve the problem
shiv gaur
shiv gaur 2022년 4월 3일
if any one help appriciation for solving hmarsh using power series

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Programming에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by