Hi all, I'm trying to write an m-file which will compute a solution matrix given a coefficient matrix and right hand side vector using cramer's rule.. which is no problem for a specified size matrix.. but is it possible to write an m-file which computes the solution when ANY square coefficient matrix and it's right hand side vector is entered?(adsbygoogle = window.adsbygoogle || []).push({});

I guess you would need some kind of loop... but i'm not sure how to write the code to have matlab substitute the right hand side vector for a different column in the co-efficient matrix for each term...

any suggestions?

**Physics Forums | Science Articles, Homework Help, Discussion**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Using MATLAB to implement Cramer's Rule

**Physics Forums | Science Articles, Homework Help, Discussion**