Okay... I am using the randn function for a sequence of normally distributed numbers.(adsbygoogle = window.adsbygoogle || []).push({});

I am writing a program whereby I need to use this randn to give me random x and y values whose position r is less than 1

i.e. that is to say that all points fall within a 2 x 2 square centred at (0, 0).

And I MUST use randn

Can anyone help me achieve this.

thanks

**Physics Forums - The Fusion of Science and Community**

Dismiss Notice

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Matlab Help

Loading...

Similar Threads for Matlab Help | Date |
---|---|

MATLAB MATLab: Not enough inputs for nlinfit | Nov 16, 2017 |

MATLAB Help needed to fix a matlab code | Nov 8, 2017 |

New to Matlab, help with vectors | Feb 20, 2016 |

Need help with integral | Dec 23, 2015 |

MATLAB 2D diffusion equation, need help for matlab code. | Nov 7, 2015 |

**Physics Forums - The Fusion of Science and Community**