Trying to find the value of K where all theta maintains constant differences with other theta
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
%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
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Neural Simulation finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!