---
title: "Matlab and nonlinear dynamic"
author: "易水侠客"
date: "2013-05-29T22:02:12Z"
tags: []
slug: "matlab-and-nonlinear-dynamic"
draft: false
lastmod: "2013-05-29T22:10:25Z"
id: 1879690
url: "https://shadowwalker.iteye.com/blog/1879690"
---

```
clear all;
close all;
%mu=0.5;
mu=2.6:3e-4:4;
x=0.6*ones(1,200);
%for n=1:200
 %   x(n+1)=mu*x(n)*(1-x(n));
%end
%plot(x(1,:),'k','markersize',10);
%xlabel('n');
%ylabel('x(n)');
title('logistic(\mu=0.5)');
mu=2.6:3e-4:4;
k=length(mu);
x=linspace(0.6,0,k);
for n=1:k
    x(n+1)=mu(n)*x(n)*(1-x(n));
    plot(mu,x(1,:),'k.');
    xlabel('\mu');
    ylabel('x(n)');
end
```

 ![](http://dl2.iteye.com/upload/attachment/0085/1805/9343ea49-cfc4-3b88-a0e1-84ad81d70abf.jpg)