I Need the matlab code for the attach equation.

Actually I need a single value from this equation where sub_band (p,q) is a matrix.

2 件のコメント

KL
KL 2017 年 10 月 20 日
What have you tried?
Jan
Jan 2017 年 10 月 20 日
The equation provides a single value already. What have you tried so far? What is the specific problem?

回答 (2 件)

Jan
Jan 2017 年 10 月 20 日

0 投票

A = mean(sub_band(:) .^ 2);

2 件のコメント

tania manna
tania manna 2017 年 10 月 20 日
thank you.
A = mean(sub_band(:) .^ 2); or
A = mean(mean(sub_band(:) .^ 2));
Jan
Jan 2017 年 10 月 21 日
The first is a scalar already, so the second mean() has no effect.
Torsten
Torsten 2017 年 10 月 20 日

0 投票

[p q] = size(sub_band);
A = sum(diag(sub_band.'*sub_band))/(p*q);
Best wishes
Torsten.

この質問は閉じられています。

質問済み:

2017 年 10 月 20 日

閉鎖済み:

2021 年 8 月 20 日

Community Treasure Hunt

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

Start Hunting!

Translated by