user91267
user91267

Reputation: 1

Algorithm and code in SCILAB for row reduced echelon form

I am a novice learner of SCILAB, and I know that there is a pre-defined function rref to produce the row reduced echelon form. I am looking for an algorithm for transforming a m x n matrix into row reduced echelon form and normal form and hence find the rank of a matrix.

Can you please help? Also, we have rref as a pre-defined function in SCILAB, how can we get the scilab code for it? How to find out the code/ algorithm behind any function in SCILAB?

Thanks for your help.

Upvotes: 0

Views: 2552

Answers (1)

spoorcc
spoorcc

Reputation: 2955

Help about functions

The help pages of Scilab always provide some information and short examples. You can also look at the help online (rref help).

The examples are without output, but demonstrate the various uses. A good first approach is to copy-paste the complete example code into a new scinotes window, save it and press F5 to see what it does. Then modify or extend the code to suite your wanted behavior.

rref & rank

Aren't you looking for the rank function instead? Here an example of using both.

A = [1,2,3;4,5,6;1,2,3]

rref(A);
rank(A);

B = [1,2,3;7,5,6;0,8,7];
rref(B);
rank(B);

Source code

Since Scilab is open source you can find the source code on their git repository, for instance the rref implementation is here.

Upvotes: 0

Related Questions