Watch this Author's files

The function fails for "higher" dimension. E.g.

>> A=rand(4,4); >> det(A)

ans =

0.0149

>> [L,P,D,U]=lpdu(A)

Warning: Matrix is close to singular or badly scaled. Results may be inaccurate. RCOND = 1.421637e-033. > In LPDU at 83

L =

1.0e+016 *

0.0000 0 0 0 -1.2269 0.0000 0 -0.0000 -1.2245 0.0000 0.0000 0.0000 1.1595 0.0000 -0.0000 0.0000

P =

1 1 0 0 1 0 1 0 1 0 0 1 1 0 0 0

D =

1.0e+014 *

1.9878 0 0 0 0 0.0000 0 0 0 0 -0.0000 0 0 0 0 0.0000

U =

1.0000 3.1587 12.4369 11.8480 0 1.0000 -4.0000 4.0000 0 0 1.0000 0.2882 0 0 0 1.0000

>> norm(L*P*D*U-A)

7.2518e+031

Some comments:

- insufficient H1 line

These lines:

check=int8 (L*U)

if check==A disp(sprintf (' the equation L*U=A is correct ')) else disp(sprintf ('error')) end

will almost always state an error, because of the casting. Why did you do it that way?

With this sample data:

A=[0 2;3 4]; B=[5;6];

your function gives:

x_soln =

NaN NaN

There is just no pivoting. You didn't limit the usage to strictly regular matrices A. No error check supplied.

Regards, Stefan

I cannot open the document. A pdf file would be more appropriate.

Still the same error. You should do proper testing before publishing your work.

A library is missing, so the model isn't running:

Failed to find library 'aerolibutil' referenced by 'sliding_mode_control/3-Link PUMA Robot-Block 2/I matrix/B matrix/b112/SinCos(2*teta2+teta3)'. This library must be on your MATLAB path.

Contact us