Dear All,
A little update to the previous query. I modified the ode45 code to obtain the value of inductance for each changing of the plunger position x.
L0 = 3.8184e-3; % initial value of inductance
i = 8.75; % current in ampere
x = plungerPosition;
for j = 1:numel(F)
[x,L] = ode45(@eval, x, L0,[],F(j)); % F is the force at each plunger position
end
function dLdx = eval(x,F,i)
dLdx = (F/0.5*i^2); % equation is dL/dx = F/0.5*i^2
end
With this code, I get the value of inductance L for each plunger position x.
Could you please tell me if the code that I have written is correct?
Thanks and Regards,
Goutham Sajja