nrows(d), ncols(d)

I found myself continually typing size(A,1) and size(A,2) to get the number of rows and columns. Finally, I just wrote the (very) simple scripts nrows.m and ncols.m. All they do is call the size command but it makes code easier to read…

[cc lang="matlab"]
>> B = zeros( nrows(A), ncols(A) );
[/cc]
The obvious and simple definitions are:
[cc lang="matlab"]
function [n] = nrows(d)
n = size(d,1);
[/cc]

[cc lang="matlab"]
function [n] = ncols(d)
n = size(d,2);
[/cc]

Passwordless Login Using SSH

Computer c1 – connect from this computer

Computer c2 – connect to this computer

1. Connect to c1
2. type: ssh-keygen -t rsa -b 2048
* default directory for keyfiles will be ~/.ssh/
* if you do not want to be prompted, leave passphrase blank
3. copy the contents of .ssh/id_rsa.pub (there should only be one line)
4. place this line on c2, in ~/.ssh/authorized_keys