This blog has moved! Redirecting...
You should be automatically redirected. If not, visit http://scrolls.mafgani.net/ and update your bookmarks.

Tuesday, June 20, 2006

Create a matrix with specific diagonal elements in MATLAB

Stupid, but lest I forget how to do this once again:

For a 4x4 matrix with uniformly distributed random elements with infinity on the diagonal.

>> A=diag(inf(4,1))+rand(4,4)

0 Comments:

Post a Comment

<< Home