You are now following this question
- You will see updates in your followed content feed.
- You may receive emails, depending on your communication preferences.
Why the lsqnonlin solver not able to solve the problem when used with MultiStart?
2 views (last 30 days)
Show older comments
Siva Rama Krishna Ayaluru
on 9 Jun 2023
I want to solve two non-linear equations using lsqnonlin solver. For this I created a problem using CreateOptimProblem and solving it using MultiStart since my optimization problem is not convex rather having multiple local minima. I used the below code:
%The code below solves two equations. The initial part of the code generates 10000 values of random data U,V,x_0,y_0 which are seed values for fsolve
clc
clear all
close all
c=4;
d=10^-3;
alpha=1;
n=10;
N1=35;
%Generating 35 values of Gaussian distributed random delay in the range
%5*10^-3 and 6*10^-3
a=5*10^-3;
b=6*10^-3;
X = (b-a).*randn(1,35) + a;
X1 = X;
%Generating T_1_i_A
T_1_i_A=0.0001:0.0001:0.0035;
%Generating T_2_i_B and T_2_i_P from T_1_i_A,d,X
T_2_i_B=zeros(N1);
for j=1:N1
T_2_i_B(j)=T_1_i_A(j)+10*10^-3+2.02*(T_1_i_A(j)-T_1_i_A(1))+15*10^-4+X(j);
end
T_2_i_P=zeros(N1);
for j=1:N1
T_2_i_P(j)=T_1_i_A(j)+20*10^-3+1.01*(T_1_i_A(j)-T_1_i_A(1))+5*10^-4+X1(j);
end
%finding U and V
U=T_2_i_P-T_2_i_B;
V=T_1_i_A-T_1_i_A(1);
fun = @root2d;
%Generating 10000 random values of pre-defined clock offset in the range
%5*10^-6 and 30*10^-6
a=-10*10^-3;
b=10*10^-3;
%a=5*10^-6;
%b=30*10^-6;
x_0 = (b-a).*rand(1,n) + a;
%Generating 10000 random values of pre-defined clock skew in the range
%1.01 and 1.20
a1=0.99;
b1=1.01;
y_0=(b1-a1).*rand(1,n)+a1;
x0=zeros(2,n);
for i=1:n
x0(:,i)=[x_0(i); y_0(i)];
end
maxN=35;
x = zeros(size(x0,1), n, maxN);
for N=5:maxN
for i=1:n
problem=createOptimProblem('lsqnonlin','objective',@(x) root2d(x, U(N),V(N),N,c,d,alpha), 'x0', x0(:,i),'lb', [-10*10^-3;0.99], 'ub', [10*10^-3;1.01],'options',optimoptions(@lsqnonlin,'Algorithm','trust-region-reflective'));
ms = MultiStart('StartPointsToRun','bounds');
x(:,i,N) = run(ms,problem,20);
end
mse_theta_offset_hat_final(N)=mse(x(1,:,N),x_0);
mse_theta_skew_hat_final(N)=mse(x(2,:,N),y_0);
end
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
MultiStart completed the runs from all start points.
All 20 local solver runs converged with a positive local solver exit flag.
%Plots
k=5:N1;
subplot(2,1,1),plot(k,mse_theta_offset_hat_final(5:N1),'r+-')
title('clock offset')
xlabel('No. of Observations')
ylabel('MSE')
grid on
subplot(2,1,2),plot(k,mse_theta_skew_hat_final(5:N1),'-*')
title('clock skew')
xlabel('No. of Observations')
ylabel('MSE')
grid on
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1407114/image.png)
function f = root2d(x, U, V, N,c,d,alpha)
f(1)=(1.5./(U-x(1)-x(2)*V+d)-(c/2)./(U-x(1)-x(2)*V+d).^2)*N+alpha*sum(1:N);
f(2)=((1.5*V)./(U-x(1)-x(2)*V+d)-(c/2)*V./(U-x(1)-x(2)*V+d).^2+alpha*V)*N;
end
Answers (1)
Torsten
on 9 Jun 2023
Moved: Torsten
on 9 Jun 2023
If you substitute
y = 1/(U-x(1)-x(2)*V+d)
you will see that you have two equations in one unknown, namely y.
So most probably, you won't get a solution that satisfies both equations exactly.
And if you aim at the least-squares solution y*, there will most probably be infinitly many combinations for x(1) and x(2) such that
y* = 1/(U-x(1)-x(2)*V+d)
In other words: Your code will produce garbage.
See Also
Categories
Find more on Global or Multiple Starting Point Search in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!An Error Occurred
Unable to complete the action because of changes made to the page. Reload the page to see its updated state.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)