I'm trying to create a matrix like this:
I'm able to create one matrix with a=diag(1:10)
and another with b=(1:10)+(0:9)'
But I don't know how to combine them together to get A.
Thanks for your help

 채택된 답변

the cyclist
the cyclist 2020년 1월 28일

0 개 추천

a = diag(1:10);
a(1,:) = 1:10;
a(:,1) = 1:10;

추가 답변 (1개)

Ben Mai
Ben Mai 2020년 1월 28일

0 개 추천

Thank you :)

카테고리

도움말 센터File Exchange에서 Operating on Diagonal Matrices에 대해 자세히 알아보기

제품

질문:

2020년 1월 28일

답변:

2020년 1월 28일

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by