function x = logmap(R, timesteps, xinit, color) clc x = zeros(timesteps,1); x(1) = xinit; for t = 1:length(x)-1 x(t+1) = R*x(t)*(1-x(t)); end plot(x, [color,'.-']) xlabel('time') ylabel('population')
and query the code with
I get a figure with values 0-50 on the X-axis and 0-1 on the Y-axis. But what I am trying to do is init value of 0.3 on the scale of 100 (i.e) the Y-axis scale should be 0-100 such that the init plot is 0.3 * 100 = 30.
I tried to change the limits using 'Plot tools' which basically changed the whole graph. And also I have tried using 'axis' which does not seem to work here.
I tried both the approaches like I mentioned in my question. Not sure they work the way I want them to. The problem is with mapping init value of 0.3 with Y-axis value 30 on X-axis timestep 1. Thanks.
No products are associated with this question.
Play games and win prizes!Learn more