x∈R

where x is a variable

such as

```
a=rand(10,1);
B=rand(10,1);
cvx_begin
variable x(10)
max(a*x.^2-a*x+B)
subject to
x<=inf;x>=-inf; %**Is that right??**
cvx_end
```

x∈R

where x is a variable

such as

```
a=rand(10,1);
B=rand(10,1);
cvx_begin
variable x(10)
max(a*x.^2-a*x+B)
subject to
x<=inf;x>=-inf; %**Is that right??**
cvx_end
```

`x`

is unconstrained, so just leave out the “constraints” on it.

However, your objective function is not s a scalar, which makes no sense, and is not allowed. Did you mean to have `sum`

in there?

```
a=rand(10,1);
B=rand(10,1);
cvx_begin
variable x(10)
max(sum(a.*x.^2-a.*x+B))
cvx_end
```

It means that x∈R?

Yes, but technically R^n, because `x`

is `n dimensional.