Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- f45[{x_, y_}] := {x + 1, y^2 + 1};
- NestWhileList[f45, {0.1, 0.1}, "here I dont know"]
- NestWhileList[f45, {0.1, 0.1}, Norm[Last[f45]]] < 1]
- condition[vector_] := Norm[vector] < 10
- f45[{x_, y_}] := {x + 1, y^2 + 1};
- NestWhileList[f45, {0.1, 0.1}, condition]
- (*
- ==> {{0.1, 0.1}, {1.1, 1.01}, {2.1, 2.0201}, {3.1, 5.0808}, {4.1,
- 26.8146}}
- *)
- f45[{x_, y_}] := {x + 1, y^2 + 1}
- With[{max = 2}, NestWhileList[f45, {0.1, 0.1}, Norm[#] < max &]]
- f46[x_, y_] := {x + 1, y^2 + 1}
- With[{max = 2}, NestWhileList[f46[#[[1]], #[[2]]] &, {0.1, 0.1}, Norm[#] < max &]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement