ones and diagonal matrices in one Matrix
1 view (last 30 days)
Show older comments
Dimitris Georgis
on 14 May 2015
Commented: Dimitris Georgis
on 14 May 2015
Hello, everyone I want a matrix where in the diagonal i want specific values and the rest arrays i want to have the same value. I have attach the matrix i want to make. How can i do that, when i have already make the diagonal.
Thank you, Dimitris
Accepted Answer
More Answers (1)
Jan
on 14 May 2015
When d is "var(d_1^2)" and v is the vector added to the diagonal:
Result = repmat(d, n, n) + diag(v);
See Also
Categories
Find more on Operating on Diagonal Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!