place array in a matrix

조회 수: 3 (최근 30일)
monkey_matlab
monkey_matlab 2016년 10월 15일
답변: Geoff Hayes 2016년 10월 15일
Hello, I have these points:
x1 = (1,0), x2 = (0.5,1), x3 = (0.5,1.5), x4 = (0, -1), x5 = (-1,1), x6 = (0.5, -1)
How do I go about generating a 6 x 6 matrix with entries
x1'x1 x1'x2 x1'x3 x1'x4 x1'x5 x1'x6
x2'x1 x2'x2 x2'x3 x2'x4 x2'x5 x2'x6
x3'x1 x3'x2 x3'x3 x3'x4 x3'x5 x3'x6
x4'x1 x4'x2 x4'x3 x4'x4 x4'x5 x4'x6
x5'x1 x5'x2 x5'x3 x5'x4 x5'x5 x5'x6
x6'x1 x6'x2 x6'x3 x6'x4 x6'x5 x6'x6

채택된 답변

Geoff Hayes
Geoff Hayes 2016년 10월 15일
Perhaps I'm misunderstanding but if
x = [1.0000 0
0.5000 1.0000
0.5000 1.5000
0 -1.0000
-1.0000 1.0000
0.5000 -1.0000];
which is a 6x2 array, then wouldn't
x*x'
be the desired 6x6 array?

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Matrices and Arrays에 대해 자세히 알아보기

태그

제품

Community Treasure Hunt

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

Start Hunting!

Translated by