1
震えでプロットするときに凡例を表示することができません。私はR2017aを使用しています。震えでプロットするときに予想外の凡例が表示される
% Some parameters
k1 = 1;
k2 = 1;
k3 = 10;
E = 10;
% establish the grid of possible C and S values
[cmesh,smesh] = meshgrid(0:0.5:10,0:0.5:10);
% Calculate nullcine and the tendencies at each value of the grid
cnull = k1.*E.*smesh./(k1.*smesh + k2 + k3);
dsdt = -k1.*(E - cmesh).*smesh + k2.*cmesh;
dcdt = k1.*(E - cmesh).*smesh - (k2 + k3).*cmesh;
% Plot the phase plane
quiver(smesh,cmesh,dsdt,dcdt);
hold on;
plot(smesh, cnull);
hold on;
plot([1:10],[1:10]);
legend('Trajectory', 'C nullcline', 'S(t),C(t)');
xlabel('S');
ylabel('C');
axis([0,10,0,10]);
title('Phase Plane');
作成された図の線の色がプロットされた線と一致しません。