Hello , i had a problem with squaring a norm function

the function is

0.5*||(W.’)*sqrt(Rx)||^2 .

W is a 20*1 vector
Rx is a 20*20 Matrix

i have tried

0.5*(square(norm(W.’*(sqrt(Rx)),2)

but there is a discipline error

Hello , i had a problem with squaring a norm function

the function is

0.5*||(W.’)*sqrt(Rx)||^2 .

W is a 20*1 vector
Rx is a 20*20 Matrix

i have tried

0.5*(square(norm(W.’*(sqrt(Rx)),2)

but there is a discipline error

Depending on the context, perhaps you don’t really need to square the norm.

If you do need to square the norm, you can use `square_pos`

instead of `square`

. Or if `y`

is the argument of norm,. you can use `y'*y`

.

The function at first was

0.5*W.'*Rx*W + summation(eita+eitaDash)

The problem was that the part first part of the function had a problem as Rx turned the expresion to Convex/concave

I don’t understand. Has your problem been resolved or do you still have a problem? If the latter, you need to provide more information.

If

`0.5*norm(W.’*(sqrt(Rx)),2)`

is valid, then

`0.5*(square_pos(norm(W.’*(sqrt(Rx)),2)`

should be valid.

If `0.5*norm(W.’*(sqrt(Rx)),2)`

is not valid

then you need to show your complete problem, so that we can understand what the argument of norm is.

It is valid and it worked , thank you