Modification of objective function for optimization without using matlab function
显示 更早的评论
Dear all,
I am writting a code like
syms y, z
N=input('length of the data= ');
x = constellation(randi([1 4],1,N)); %QPSK data(constellation is already declared)
hr=(randn(1)+j*randn(1));
hr1=(randn(1)+j*randn(1));
r=z*(hr.*x+hr1.*y);
xt = x;
xt(2:2:end) = 0;
rr = r;
rr(1:2:end) = 0;
rl=6*rr+z*n; % n is random value
for ii=1:N
p(ii)= mean(norm(xt(ii)-rl(ii))^2);
end
c_3=sum(p);
obj=matlabFunction(c_3);
This code is running ,but I don't want to use matlabfunction. How I can write(modify) my objective function directly according to my code which will be useful for optimization ?
Thanks in advance
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Systems of Nonlinear Equations 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!