help me to type this eq in MATLAB script

1 Ansicht (letzte 30 Tage)
nayan gupta
nayan gupta am 15 Okt. 2022
Kommentiert: Image Analyst am 16 Okt. 2022
help me to type this eq(file attached) in MATLAB script
  4 Kommentare
nayan gupta
nayan gupta am 15 Okt. 2022
N is the Power of alpha
Image Analyst
Image Analyst am 16 Okt. 2022
Understood. But what did you think of the answers below?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 15 Okt. 2022
It's not clear what your variable names are, how many dimensions they have, and what variable (i or r) is in each dimension, probably because you didn't read the community Guidelines before posting. But here is a stab at it:
denominator = sum(xw(:, r) .* alpha(:, r) .^ N);
xD(r) = xw(:, r) ./ denominator
If you have any more questions, then attach your data and code to read it in with the paperclip icon after you read this:
  1 Kommentar
Walter Roberson
Walter Roberson am 15 Okt. 2022
If is a row vector of length C and α is a 2D array that is C by something, then you could save on the explicit sum by using
xd = xw ./ (xw * alpha.^N)
where * is the matrix multiplication operation.
but for the sizes to work out properly, alpha would have to turn out to be square

Melden Sie sich an, um zu kommentieren.

Kategorien

Mehr zu Startup and Shutdown finden Sie in Help Center und File Exchange

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by