[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: zeros(n)
From: |
James Sherman Jr. |
Subject: |
Re: zeros(n) |
Date: |
Tue, 16 Sep 2014 22:00:43 -0400 |
>From the help file for zeros:
If invoked with a single scalar integer argument, return a square NxN matrix.
So, if you call the function as:
zeros(20000)
You're requesting a matrix of size 20000x20000
In your for loop, you're initializing a 1x20000 array. If you want
zeros to do what your for loop is doing, you should call it as:
zeros(1, 20000)
Hope this helps.
James Sherman