【问题标题】:Population Modelling MATLAB人口建模 MATLAB
【发布时间】:2017-10-20 15:53:29
【问题描述】:

我有一个莱斯利矩阵

LeslieMatrixA = [0  0.4  0.7  0.5; 
                 x  0    0    0; 
                 0  0.8  0    0; 
                 0  0    0.7  0]

还有一个初始种群向量[10;10;10;10],其中0.7<=x<=0.9

如何创建 MATLAB 代码来显示群体随时间的行为?

任何帮助表示赞赏!

谢谢。

【问题讨论】:

    标签: matlab data-modeling modeling matlab-guide


    【解决方案1】:

    如果你只是想展示人口如何变化,你可以把它画出来吗?

    x=0.7;
    LeslieMatrixA = [0 0.4 0.7 0.5; x 0 0 0; 0 0.8 0 0; 0 0 0.7 0];
    P = [10;10;10;10];
    for ct = 1:10
        bar([1:4],P)
        title(sprintf('iteration: %.0f',ct))
        pause
        P=LeslieMatrixA*P;
    end
    

    【讨论】:

    • 你想要什么样的输出?
    猜你喜欢
    • 2017-09-06
    • 2018-09-21
    • 2021-12-24
    • 2021-10-31
    • 1970-01-01
    • 2020-04-03
    • 1970-01-01
    • 2014-01-14
    • 2015-08-16
    相关资源
    最近更新 更多