#### Ponovno uporabi vse: Med priljubljene dodajte najbolj uporabljene ali zapletene formule, grafikone in kar koli drugega ter jih v prihodnosti hitro ponovno uporabite. Več kot 20 besedilnih funkcij: Izvleček številke iz besedilnega niza; Izvleči ali odstrani del besedil; Pretvorite številke in valute v angleške besede. Združi orodja: Več delovnih zvezkov in listov v eno; Združi več. D = diag (v) returns a square **diagonal** **matrix** with the elements of vector v on the main **diagonal**. example. D = diag (v,k) places the elements of vector v on the k th **diagonal**. k=0 represents the main **diagonal**, k>0 is above the main **diagonal**, and k<0 is below the main **diagonal**. example. x = diag (A) returns a column vector of the main **diagonal**. Up until now, I've tried =index(A1:D1,,rows($1:1) which **extracts** the value of the square **matrix** about the **diagonal** of (A+1)(1+1). What I'm looking for is a formula to **extract** (A+1)(1+5). I would do this by hand if I had a few lines of data but I'm working with an array of 260K Cells right now so I'm desperate! I appreciate your help!-Bobby.

**diagonal**

**matrix**with each data on the column spread across the

**diagonal**of the

**matrix**formed. e.g. say a1=2, a2=3 and a3=5....I want a

**diagonal**

**matrix**that will have a1=2, b2=3,c3=5 etc. with other cells of the

**matrix**having "0" values. If you know the dimensions of your

**matrix**(square or otherwise), you can

**extract**any

**diagonal**you like, or even modified diagonals (such as numbers in (1,1), (2,3), (3,5), etc), somewhat faster than using diag, by simply using an index call like this: a=M (1:4:9) (note: this produces a row vector; for a column vector, just transpose) For an NxN. ok, [email protected] . I have a single column that has 900 cells contained with data. I want to split these 900-cell vector data into a

**diagonal**

**matrix**with each data on the column spread across the

**diagonal**of the

**matrix**formed. e.g. say a1=2, a2=3 and a3=5....I want a

**diagonal**

**matrix**that will have a1=2, b2=3,c3=5 etc. with other cells of the

**matrix**having "0" values.