GUI Deployed into EXE is not working propaply
3 ビュー (過去 30 日間)
古いコメントを表示
Hi Everyone,
I used the deploytool command to build a stand alone application (EXE),
The GUI is working well, but the EXE file doesn't work completely.
The problem occures when I use the button that performs the following commands:
syms T
fun1=(b(1)*T+(b(2)/2)*T^2+(b(3)/3)*T^3+(b(4)/4)*T^4+(b(5)/5)*T^5+b(6))*(8314/Mw)-handles.metricdata.Enthalpy;
f1=inline(fun1);
fun2=(a(1)*T+(a(2)/2)*T^2+(a(3)/3)*T^3+(a(4)/4)*T^4+(a(5)/5)*T^5+a(6))*(8314/Mw)-handles.metricdata.Enthalpy;
f2=inline(fun2);
z1=diff(fun1); % = Cp 1st species for T<1000
z2=diff(fun2); % = Cp 1st species for T>1000
f3=inline(z1);
f4=inline(z2);
T0= str2double(get(handles.text6,'string'));
T=T0;
for i=0:inf %Newton Raphson Method
x=T;
if T<1000
T=x-(f1(T)/f3(T));
else
T=x-(f2(T)/f4(T));
end
if abs(x-T)<0.001 %Tolerence
break
end
end
I Think the problem is in the For loop that extends from 1:inf!!
Because its too large, but it works well in the GUI file!!
Any help is appreciated.
Mohamed Selim
5 件のコメント
muhammad asif
2021 年 3 月 21 日
what wo do to make standalone app for code contains 'syms' is there any alternate solution
Walter Roberson
2021 年 3 月 24 日
what wo do to make standalone app for code contains 'syms' is there any alternate solution
Yes, if you look around, you can find C++ projects to do symbolic computation that you could link to from your MATLAB code. The facilities offered by the projects varies a lot. For example some of them only offer basic extended precision addition subtraction multiplication division, and trig and logarithms, but others have some degree of calculus or linear algebra.
However, you will not find the full MATLAB Symbolic Toolbox, and there is no possibility at this time of convincing Mathworks products to compile functions from the Symbolic Toolbox.
As I wrote above,
"You should use a program to calculate the formula symbolically, and you should use matlabFunction() with the output file option to have it write a file of MATLAB code that implements the formula in non-symbolic form. Then your compiled GUI would call upon those function files, never using the symbolic toolbox itself."
採用された回答
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で File Operations についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!