help me to type this eq in MATLAB script

조회 수: 5 (최근 30일)
nayan gupta
nayan gupta 2022년 10월 15일
댓글: Image Analyst 2022년 10월 16일
help me to type this eq(file attached) in MATLAB script
  댓글 수: 4
nayan gupta
nayan gupta 2022년 10월 15일
N is the Power of alpha
Image Analyst
Image Analyst 2022년 10월 16일
Understood. But what did you think of the answers below?

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2022년 10월 15일
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
Walter Roberson
Walter Roberson 2022년 10월 15일
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

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by