Info

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

Error when I try to use Code Analyzer suggestions

1 view (last 30 days)
Andrew Farsech
Andrew Farsech on 12 Dec 2015
Closed: MATLAB Answer Bot on 20 Aug 2021
I get the following warning: INV is slow and inaccurate. Use A\b for INV(A)*b , and b/A for b*INV(A)
the warning happens at at these 3 lines
a = a1 + p1*Z'*inv(f1)*(vt);
p = p1 - p1*Z'*inv(f)*Z*p1;
s(t,:) = v'*inv(f)*v;
I have tried to follow the suggestion without success. Probably I haven't understand the right equivalent syntax.
How I should write these code lines?
  2 Comments
Andrew Farsech
Andrew Farsech on 13 Dec 2015
thanks, I know that it's only a warning not an error, the error happened in calculation because I have made a mistake in the attempt to follow the hint.

Answers (0)

Community Treasure Hunt

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

Start Hunting!