Using matlabFunction to run solve() in a deployed app
Hi. I’m trying to use matlabFunction to run solve() statements, so the app will be deployed fine. I have this example code:
if ~isdeployed()
syms x
eq = solve(x + 5 == 8, x);
fun = matlabFunction(eq, ‘File’, ‘SolveTest.m’);
clear x eq fun
else
fun = @SolveTest;
end
app.EditField.Value = SolveTest;
it works fine inside appdesigner, but when I try to deploy it by ‘deploytool’, I get this error:
Warning: In "test.mlapp", "syms" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license. Either remove the file or function from your code, or use the MATLAB function "isdeployed" to ensure the function is not invoked in the deployed component.
how can it be fixed?
I’m using R2022b.Hi. I’m trying to use matlabFunction to run solve() statements, so the app will be deployed fine. I have this example code:
if ~isdeployed()
syms x
eq = solve(x + 5 == 8, x);
fun = matlabFunction(eq, ‘File’, ‘SolveTest.m’);
clear x eq fun
else
fun = @SolveTest;
end
app.EditField.Value = SolveTest;
it works fine inside appdesigner, but when I try to deploy it by ‘deploytool’, I get this error:
Warning: In "test.mlapp", "syms" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license. Either remove the file or function from your code, or use the MATLAB function "isdeployed" to ensure the function is not invoked in the deployed component.
how can it be fixed?
I’m using R2022b. Hi. I’m trying to use matlabFunction to run solve() statements, so the app will be deployed fine. I have this example code:
if ~isdeployed()
syms x
eq = solve(x + 5 == 8, x);
fun = matlabFunction(eq, ‘File’, ‘SolveTest.m’);
clear x eq fun
else
fun = @SolveTest;
end
app.EditField.Value = SolveTest;
it works fine inside appdesigner, but when I try to deploy it by ‘deploytool’, I get this error:
Warning: In "test.mlapp", "syms" are excluded from packaging for the MATLAB Runtime environment according to the MATLAB Compiler license. Either remove the file or function from your code, or use the MATLAB function "isdeployed" to ensure the function is not invoked in the deployed component.
how can it be fixed?
I’m using R2022b. matlabfunction, appdesigner, solve MATLAB Answers — New Questions