Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

New to MATLAB?

Alternative to "solve" command for faster computation?

Asked by Heryswe

Heryswe (view profile)

on 18 Feb 2013

Hello, is there an alternative approach to solve-command when computing 3 unknown variables out of 3 equations? Specifically, I have 3 points (X coordinates) lying on a curve and I want to get the radius of this curve (using the analytic circle equation). It actually works with solve but the problem is that I do this in a loop where the computation time is crucial, according to the Run&Time solve seems to be the largest source of the time delay.

Thank you for your hints



Heryswe (view profile)



No products are associated with this question.

1 Answer

Answer by Walter Roberson

Walter Roberson (view profile)

on 18 Feb 2013

solve() once will symbolic variables, either before the loop or while you are designing the program. Use matlabFunction() to turn the symbolic version into a function handle of a numeric function (or to write the function to a file.)


Walter Roberson

Walter Roberson (view profile)

Contact us