MATLAB: How to generate all the possible values for a vector

variables

I want to generate all the values of [r1;r2] such that 300<=r1,r2<=300. How can I do this?

Best Answer

  • You cannot generate that. There are 4574883165222469632 representable double precision values for 300 <= r1, and 18437736874454810624 representable double precision values for r2 <= 300. Forming each pair of possibilities would give you 84350492031744868214373536880150970368 combinations, each 16 bytes long. That is just short of 2^130 bytes of storage required. There is not that much memory in the universe.