Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fprintf("Plotting...\n");
- vector_size = 1000;
- H = zeros(vector_size);
- P = zeros(vector_size);
- H(1) = rand(1);
- P(1) = rand(1);
- R = rand(1);
- b = rand(1);
- c = rand(1);
- for i = 1:(vector_size - 1)
- H(i+1) = R * H(i) / ((1 + H(i)) ^ b) * e ^ (0 - c * P(i));
- P(i+1) = H(i) * (1 - e ^ (0 - c * P(i)));
- endfor
- scatter(H, P);
- fprintf("Plot complete. Press enter to continue\n");
- pause;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement