Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/matlab/13.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Matlab 电磁阀电感L作为其柱塞位置x函数的评估_Matlab_Ode45 - Fatal编程技术网

Matlab 电磁阀电感L作为其柱塞位置x函数的评估

Matlab 电磁阀电感L作为其柱塞位置x函数的评估,matlab,ode45,Matlab,Ode45,我需要在Matlab中解决一个问题,其中我必须根据以下公式计算每个柱塞位置的电磁阀电感值: f=0.5*i^2(dL/dx) i是提供给电磁阀的电流,f是柱塞在其位置每一步上的作用力 我需要提取L的值作为x的函数 我尝试使用以下Matlab代码: L0 = 3.8184e-3; % inital value of induactance i = 8.75; % current in amp

我需要在Matlab中解决一个问题,其中我必须根据以下公式计算每个柱塞位置的电磁阀电感值:

f=0.5*i^2(dL/dx)

i是提供给电磁阀的电流,f是柱塞在其位置每一步上的作用力

我需要提取L的值作为x的函数

我尝试使用以下Matlab代码:

L0 = 3.8184e-3;                         % inital value of induactance
i = 8.75;                               % current in ampere
x = plungerPosition;                    % data exported in .mat file from excel
for j = 1:numel(F)                      % F is the force at each plunger position, also exported in .mat file from excel
[x,L] = ode45(@eval, x, L0,[],F(j));
end
function dLdx = eval(x,F,i)
dLdx = (F/0.5*i^2);                     % equation is dL/dx = F/0.5*i^2
如果你能提供宝贵的意见,那就太好了

感谢和问候, 古瑟姆萨贾