Check if a vector and matrix are orthogonal (MATLAB)

조회 수: 43 (최근 30일)
high speed
high speed 2022년 3월 25일
댓글: Rik 2022년 3월 25일
Dear,
I founded this program:
clear;clc;
Niter = 2; % number of iterations
EsN0_dB = -3:1:7; % SNR range to plot over
msg_num = 2000; % number of messages per SNR value
H =[1 1 1 1 0 0 0 0 0 0;
1 0 0 0 1 1 1 0 0 0;
0 1 0 0 1 0 0 1 1 0;
0 0 1 0 0 1 0 1 0 1;
0 0 0 1 0 0 1 0 1 1];
[rows, cols] = size(H);
[G_sys, H_sys] = gen_Gsys_from_H(H);
check = mod(G_sys*H_sys',2); % to see if orthogonal
But I don't have the function gen_Gsys_from_H(H)
I want just to understand if G_sys in this case is a vector or matrix. And what the result check must be to see if it is orthogonal or not ?
  댓글 수: 5
high speed
high speed 2022년 3월 25일
The number of columns in this example is 10, but I didn't understand why did you choose 3. Also, H_sys is normally a matrix, but in the line that you wrote you have considered H_sys as a vector not a matrix. As I have understand that to confirm if it is orthogonal or not we must have mod-2=0 of the product between the vector and the transposed matrix. So normally G_sys is a vector and H_sys is a vector no?
Rik
Rik 2022년 3월 25일
I don't know anything about your application. What I told you is what you can learn from the code itself. If the variable check must be a scalar, then those two other variables must be vectors. Matlab doesn't care about the length, as long as they're equal. I don't know what that function was supposed to do, that is why I posted a comment, not an answer.

댓글을 달려면 로그인하십시오.

답변 (1개)

Mohammed Hamaidi
Mohammed Hamaidi 2022년 3월 25일
Orthogonality mean 'mod 2=0'

카테고리

Help CenterFile Exchange에서 Line Plots에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by