Info

This question is closed. Reopen it to edit or answer.

How to use command numeric::leastSquares in matlab 2012b

1 view (last 30 days)
Ben
Ben on 24 Mar 2013
Closed: MATLAB Answer Bot on 20 Aug 2021
Hi,
I got some difficulty in using numeric::leastSquares in matlab 2012b, when I type the command into the window, it just pump out an error: Error: Unexpected MATLAB operator. I check it for a long time but can't find a way to fix it. Please help me. Thank you so much.
  2 Comments
Ben
Ben on 24 Mar 2013
Edited: Walter Roberson on 24 Mar 2013
A=data(1:11,1:11)';
B=data(1:11,2:12)';
numeric::leastSquares(A, B)

Answers (1)

Walter Roberson
Walter Roberson on 24 Mar 2013
numeric::leastsquares is not a MATLAB operation: it is a MuPAD operation, and needs to be run inside of MuPAD.
A=data(1:11,1:11)';
B=data(1:11,2:12)';
feval(symengine, 'numeric::leastSquares', A, B)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!