%Run lvmodel

tspan = [0 100 ];
load_system('lvmodel');

for i = 10:50

    set_param('lvmodel/Constant1', 'value', num2str(i));
    [t,x,y] = sim('lvmodel',tspan);
    prey_store{:,:,i} = prey; 
    
    y = fft(prey,2048);
    f = 1000*(0:1023)/2048;
    Pyy = y.* conj(y) / 2048;
    hold on;
    index=find(Pyy==max(Pyy));
    plot(i,x(index),'r.', 'MarkerSize',25);
    hold off;
end
