# Triangle inequality for Gausisian Random Variable

조회 수: 6(최근 30일)
답변: William Rose 2022년 9월 27일
Triangle inequality must hold for complex-valued Gaussian rando variable! The simulation on matlab shows conflect results (few negatives). kindly see the matlab code below.
clc; clear; clf;
N=10;
R=zeros(N,1); %to record the results
for T=1:N
h=randn(1,2)+1i*randn(1,2); %this is 1x2 vector [v w]
h1=sum(h); %this is a complex number: v+w
R(T,1)= h*h'- h1*h1'; % must be postive based on the triangle inequality
end
plot(R)

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

### 채택된 답변

William Rose 2022년 9월 27일
N=10;
R1=zeros(N,1); %to record the results
R2=zeros(N,1);
for T=1:N
h=randn(1,2)+1i*randn(1,2); %this is 1x2 vector [v w]
hs=sum(h); %this is a complex number: v+w
R1(T,1)= h*h'- hs*hs'; % must be postive based on the triangle inequality
R2(T,1)=abs(h(1))+abs(h(2))-abs(hs);
end
plot(R1,'-r.'); hold on; plot(R2,'-bx'); legend('R1','R2'); grid on
The thing you are computing, which I have renamed R1, is not the triangle inequality for complex numbers. The quantity R2 is the triangle inequality and it is always positive, as expected.

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

### 범주

Find more on Elementary Math 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!

Translated by