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