place matrix in array part 2
조회 수: 5 (최근 30일)
이전 댓글 표시
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)
y1 = y2 = y3 = 1 and y4 = y5 = y6 = -1.
How do I go about generating a 6 x 6 matrix with entries
y1y1x1'x1 y1y2x1'x2 y1y3x1'x3 y1y4x1'x4 y1y5x1'x5 y1y6x1'x6
y2y1x1'x1 y2y2x2'x2 y2y3x2'x3 y2y4x2'x4 y2y5x2'x5 y2y6x2'x6
y3y1x3'x1 y3y2x3'x2 y3y3x3'x3 y3y4x3'x4 y3y5x3'x5 y3y6x3'x6
y4y1x4'x1 y4y2x4'x2 y4y3x4'x3 y4y4x4'x4 y4y5x4'x5 y4y6x4'x6
y5y1x5'x1 y5y2x5'x2 y5y3x5'x3 y5y4x5'x4 y5y5x5'x5 y5y6x5'x6
y6y1x6'x1 y6y2x6'x2 y6y3x6'x3 y6y4x6'x4 y6y5x6'x5 y6y6x6'x6
댓글 수: 0
채택된 답변
Marc Jakobi
2016년 10월 15일
Well if
y = [ones(3,1); -ones(3,1)]
% or
y = [1;
1;
1;
-1;
-1;
-1];
and x is taken from your previous question, then your result would be.
res = y * y' .* x * x';
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Signal Generation and Preprocessing에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!