This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Diagonal matrix with entries of a vector

Tags: None
(comma "," separated)
MarkoFranko
Registered Member
Posts
11
Karma
0
OS
Hello!
My problem is:

I have a one row matrix Mat1=(a,b,c)

But I need a diagonal Matrix Mat2=
a, 0, 0
0, b, 0
0, 0, c

Is there some fast function for this conversion?
Thanks
User avatar
ggael
Moderator
Posts
3447
Karma
19
OS
.asDiagonal()


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]