How can I solve this nested symbolic function ?
1 回表示 (過去 30 日間)
古いコメントを表示
Hello, Im doing a metallurgical problem ,to do so I need to make the following code but returns an error when i call the following nested function, by the way I am doing so because I want to export it as an excel add-in .
valor=molienda(10,6,6,6.1,1.02,0.45,0.7,10)
function a=molienda(F_min,Diametro,Largo,Wi,F80,Vp,fVc,t)
p80=mP80(t);
%Potencia para moler el mineral
W_mineral=Wi*((10/(p80^0.5))-(10/(F80))^(0.5));
P_mineral=W_mineral*F_min*1.341;
%Potencia para mover el medio moledor
Kwb = 4.879*(D^0.3)*(3.2-3*Vp)*fVc*(1-0.1/((2^9)-10*fVc))
W_bolas=80*(Diametro^2)*Largo;
P_bolas=Kwb*W_bolas;
P_total=P_bolas+P_mineral;
a(1)=P_total;
a(2)=P80;
function P_80=mP80(tiempo)
syms Q(x) z
Q(x) = (16.4831*x^(-0.7510)+1.665)*exp(-0.9451*tiempo^0.296);
fun= 80-(100-Q(z))==0;
P_80 = double(solve(fun,z));
end
end
I can´t find the solution ,please if you know how to i would very pleased . Thanks in advance for your help.
0 件のコメント
採用された回答
Star Strider
2023 年 10 月 16 日
It would be best to abandon the idea of using the Symbolic Math Toolbox here, since it is not necessary. You can do everything necessary with anonymous functions.
Also, there are discrepancies between the function arguments and the code. I substituted ‘p80’ for ‘F80’ and ‘P80’ in order to make it work. You need to edit ‘molienda’ to resolve all these discrepancies, since I am not certain that the changes I made to it get it to work are correct.
Try this —
valor=molienda(10,6,6,6.1,1.02,0.45,0.7,10)
function a=molienda(F_min,Diametro,Largo,Wi,p80,Vp,fVc,t)
p80=mP80(t);
%Potencia para moler el mineral
W_mineral=Wi*((10/(p80^0.5))-(10/(p80))^(0.5));
P_mineral=W_mineral*F_min*1.341;
%Potencia para mover el medio moledor
Kwb = 4.879*(Diametro^0.3)*(3.2-3*Vp)*fVc*(1-0.1/((2^9)-10*fVc))
W_bolas=80*(Diametro^2)*Largo;
P_bolas=Kwb*W_bolas;
P_total=P_bolas+P_mineral;
a(1)=P_total;
a(2)=p80;
function P_80=mP80(tiempo)
% syms Q(x) z
Q = @(x) (16.4831*x.^(-0.7510)+1.665)*exp(-0.9451*tiempo.^0.296);
fun = @(z) 80-(100-Q(z));
P_80 = fsolve(fun,10);
end
end
.
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Symbolic Math Toolbox についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!