Trying to find the value of K where all theta maintains constant differences with other theta

4 vues (au cours des 30 derniers jours)
%Four neurons coupled in a neuronal system.
%each of the ith neuron is connected to other j neurons
%angular frequencies
%w1=0.26
%w2=0.24
%w3=0.27
%w4=0.25
%Determine the minimum value of K
%All these delta i will lock using ode45
%no loop
%i=1,2,3,4
%j=1
%%
clearvars;
close all;
clc;
[K,y]=ode45(@BonusPointQ2Part2,[0 100],[0 0 0 0]);
plot(y(:,1),y(:,2),y(:,3),y(:,4))
grid on
function dydt=BonusPointQ2Part2(K,theta)
dydt=zeros(4,1);
w1=0.26
w2=0.24
w3=0.27
w4=0.25
dydt(1)=w1 + (K./4).* (sin(theta(1)-theta(1)) + sin(theta(2)-theta(1)) + sin(theta(3)-theta(1)) + sin(theta(4)-theta(1)));
dydt(2)=w2 + (K./4).* (sin(theta(1)-theta(2)) + sin(theta(2)-theta(2)) + sin(theta(3)-theta(2)) + sin(theta(4)-theta(2)));
dydt(3)=w3 + (K./4).* (sin(theta(1)-theta(3)) + sin(theta(2)-theta(3)) + sin(theta(3)-theta(3)) + sin(theta(4)-theta(3)));
dydt(4)=w4 + (K./4).* (sin(theta(1)-theta(4)) + sin(theta(2)-theta(4)) + sin(theta(3)-theta(4)) + sin(theta(4)-theta(4)));
end

Réponses (0)

Catégories

En savoir plus sur Neural Simulation dans Help Center et File Exchange

Tags

Produits


Version

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by