Solve the system of equations using Cramer's Rule x+y+z=9,2x​+5y+7z=52,​.2x+y-z=0.

15 Ansichten (letzte 30 Tage)
i want code for it
  6 Kommentare
David Hill
David Hill am 4 Mär. 2021
Ask a specific question. Show us what you are trying.
Steven Lord
Steven Lord am 4 Mär. 2021
Since this is a homework assignment, show us the code you've written to try to solve the problem and ask a specific question about where you're having difficulty and we may be able to provide some guidance. [If it's not homework, just solve the system using the \ operator.]
If you aren't sure where to start because you're not familiar with how to write MATLAB code, I suggest you start with the MATLAB Onramp tutorial (https://www.mathworks.com/support/learn-with-matlab-tutorials.html) to quickly learn the essentials of MATLAB.
If you aren't sure where to start because you're not familiar with the mathematics you'll need to solve the problem, I recommend asking your professor and/or teaching assistant for help.

Melden Sie sich an, um zu kommentieren.

Akzeptierte Antwort

James Tursa
James Tursa am 4 Mär. 2021
Bearbeitet: James Tursa am 4 Mär. 2021
Original question:
Solve the system of equations using Cramer's Rule x+y+z=9,2x+5y+7z=52,.2x+y-z=0.
i want code for it
And the outline:
Did you read the algorithm description on the link I posted? The elements are as follows according to this link using the notation from the link:
Where is the matrix formed by replacing the i'th column of A by the column vector b.
You simply need to write a for-loop for this to calculate each according to the above. So your loop would look like this:
for i=1:_____
Ai = _____
x(i) = _____
end
You need to fill in the blanks.

Weitere Antworten (0)

Kategorien

Mehr zu Programming finden Sie in Help Center und File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by