**Hello,everyone! I have a expression y(k), where w_{5*3} is the variable.**

x(k)={\sum}_{k=1:3}(|1_{1*5}*w(1:5,k)|^2) -2(1_{1*5}*w(1:5,k))

y(k)= - log(x(k) )

**And, my code is as follows,is it right?
Thank you for your attention!**

```
one= ones(1,5);
w=w(1:5,3);% variable
for k=1:3
W(k) = pow_pos( norm(one*w(1:5,k)), 2) ;
end
for k=1:3
x(k) = sum(W(1:3)) -2* ( one*w(1:5,k) ) ;
y(k) = rel_entr(1,x(k));
end
```