How to copy a complex number in a cell with different sign of imaginary part?

1 回表示 (過去 30 日間)
NHJ
NHJ 2022 年 8 月 14 日
コメント済み: NHJ 2022 年 8 月 14 日
Is it possible to copy a complex number in a cell with different sign of imaginary part? For example, I have 1x1 cell of complex number, x{1,1}=[1+2j 2+3j; 1-2j 2-3j] and wanto add another cell with the same value as x{1,1} but different sign of imaginary part. The output will become 1x2 cells, x{1,1}=[1+2j 2+3j; 1-2j 2-3j] and x{1,2}=[1-2j 2-3j; 1+2j 2+3j].
x{1,1} = [1+2j 2+3j;
1-2j 2-3j]
v = repmat((cellfun(@conj,x,'UniformOutput',false)),1,2)
I try as the above codes, but they change the sign for all cells. Thanks in advance

採用された回答

dpb
dpb 2022 年 8 月 14 日
v=[x conj(x{:})];

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Processing Toolbox についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by