Need to solve the following equation with three knowns and 2 unknowns.
W0 = Wi + (1 – L)*Hi*gi
W0 and L is an unknowns.
Wi, Hi, and gi are the knowns with 172 values per each.
I want to find W0 and L and their standard deviations as well.
I want to get each values comes for W0 and L when the program runs.
But when this code runs i got 0 for standard deviation of both W10 and L. Is this code is right? Can anyone help me to solve this?
The following code was written.
Wi = Wi;
Hi = H_BM;
gi = g_mean;
% Define the objective function
fun = @(x) norm(Wi + (1 – x(1))*Hi.*gi – x(2));
% Set initial guess for L and W0
x0 = [0, 0];
% Solve the optimization problem
x = fminsearch(fun, x0);
% Extract the values of L and W0
L = x(1);
L
W0 = x(2);
W0
% Calculate standard deviation of W0 and L
std_W0 = std(W0);
std_W0
std_L = std(L);
std_LW0 = Wi + (1 – L)*Hi*gi
W0 and L is an unknowns.
Wi, Hi, and gi are the knowns with 172 values per each.
I want to find W0 and L and their standard deviations as well.
I want to get each values comes for W0 and L when the program runs.
But when this code runs i got 0 for standard deviation of both W10 and L. Is this code is right? Can anyone help me to solve this?
The following code was written.
Wi = Wi;
Hi = H_BM;
gi = g_mean;
% Define the objective function
fun = @(x) norm(Wi + (1 – x(1))*Hi.*gi – x(2));
% Set initial guess for L and W0
x0 = [0, 0];
% Solve the optimization problem
x = fminsearch(fun, x0);
% Extract the values of L and W0
L = x(1);
L
W0 = x(2);
W0
% Calculate standard deviation of W0 and L
std_W0 = std(W0);
std_W0
std_L = std(L);
std_L W0 = Wi + (1 – L)*Hi*gi
W0 and L is an unknowns.
Wi, Hi, and gi are the knowns with 172 values per each.
I want to find W0 and L and their standard deviations as well.
I want to get each values comes for W0 and L when the program runs.
But when this code runs i got 0 for standard deviation of both W10 and L. Is this code is right? Can anyone help me to solve this?
The following code was written.
Wi = Wi;
Hi = H_BM;
gi = g_mean;
% Define the objective function
fun = @(x) norm(Wi + (1 – x(1))*Hi.*gi – x(2));
% Set initial guess for L and W0
x0 = [0, 0];
% Solve the optimization problem
x = fminsearch(fun, x0);
% Extract the values of L and W0
L = x(1);
L
W0 = x(2);
W0
% Calculate standard deviation of W0 and L
std_W0 = std(W0);
std_W0
std_L = std(L);
std_L equation, unknowns MATLAB Answers — New Questions