How to solve the following type of equation that includes summation in matlab?

1 回表示 (過去 30 日間)
How to find an expression for using matlab, so that the below equation equals to zero.

採用された回答

Bruno Luong
Bruno Luong 2022 年 3 月 27 日
編集済み: Bruno Luong 2022 年 3 月 27 日
Assuming
H_m and t_m are stored in (1 x M )arrays
% Dummy test data
M = 10;
H = rand(1,M);
t = rand(1,M);
P = sum( abs(H(:)).^2 .* [-ones(M,1) +3*t(:) -3*t(:).^2 +t(:).^3]);
t0 = roots(P)
t0 =
0.2914 + 0.3069i 0.2914 - 0.3069i 0.3144 + 0.0000i
sum(abs(H).^2 .* (t - t0).^3, 2)
ans =
1.0e-15 * -0.2845 + 0.1978i -0.2845 - 0.1978i 0.1162 + 0.0000i
  10 件のコメント
Kalasagarreddi Kottakota
Kalasagarreddi Kottakota 2022 年 3 月 30 日
@Bruno Luong Thanks,
I dont see any mistake in the matlab expression. Could you please elaborate your commment.
Bruno Luong
Bruno Luong 2022 年 3 月 30 日
Elaborate what? Your orginal equation you post seems fishy to me, not the MATLAB implementation of your equation.
Another fischy fact : the expression only have sum of strictly positive quantities, you cannot expect there is a real root of it. Something is wrong with the maths/physics where you derive the expression/equation.

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by