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 Kommentare

KL
KL am 20 Okt. 2017
What have you tried?
Jan
Jan am 20 Okt. 2017
The equation provides a single value already. What have you tried so far? What is the specific problem?

Antworten (2)

Jan
Jan am 20 Okt. 2017

0 Stimmen

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

2 Kommentare

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

0 Stimmen

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

Diese Frage ist geschlossen.

Gefragt:

am 20 Okt. 2017

Geschlossen:

am 20 Aug. 2021

Community Treasure Hunt

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

Start Hunting!

Translated by