Question

Show and explain how to solve cramer’s rule using Matlab.

Show and explain how to solve cramer’s rule using Matlab.

Homework Answers

Answer #1

Let us consider the following equations

x+2y+3z=14

2x+3y+5z=23

5x+3y+6z=14

MATLAB CODE-----

clc;
clear all;
close all;

a=[1 2 3;2 3 5;5 3 6];
b=[14;23;14];

x=ones(3,1);
a_determinant=det(a); %FOR FINDING DETERMINANT

%SO FOR FINDING THE ELEMENT AT X AT INDEX I.
%IT IS GIVEN BY RATIO OF TWO DETERMINANTS.

for i=1:3
c=a;
c(:,i)=b;
x(i,1)=det(c)/a_determinant;
end

disp('APPLYING CRAMERS RULE RESULT IS');

disp('x,y,z=');

disp(x);

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
6) Cramer’s Rule Solve each using Cramer’s rule a) 3x + .5y =10       10x -   ...
6) Cramer’s Rule Solve each using Cramer’s rule a) 3x + .5y =10       10x -    -y = -3 b) x + z +y = 12 -x + 3y - z = 2      -2x + z = -2 7) Proofs Prove the following by induction     1. n3 – n is divisible by 3 for n >=2     2. . Prove that n! < nn forn ≥ 2. Prove directly that: The sum of an integer and its cube...
Use Cramer’s Rule to solve the equations : ? − ? + 2? = −3 4...
Use Cramer’s Rule to solve the equations : ? − ? + 2? = −3 4 = ?3 + ?2 + ? 3− = ? + ? + ?2
Use Cramer’s Rule to solve the system. x − 6y = 3 3x + 2y =...
Use Cramer’s Rule to solve the system. x − 6y = 3 3x + 2y = 1
Matlab equation solve code please show me the code for how to solve x=1-e^-2x in Matlab...
Matlab equation solve code please show me the code for how to solve x=1-e^-2x in Matlab with explanation show me the code and result
Solve the national income model in homework by matrix inversionorby OR by Cramer’s Rule. Y =...
Solve the national income model in homework by matrix inversionorby OR by Cramer’s Rule. Y = C + I0+ G0+ (X-M) C = a + b(Y-T+R),  0<b<1   T = tY,  0<t<1 where R is transfer payments, (X-M) is net exports, and the other variables are as defined in class.
Solve the following system by Gauss elimination: x + 2y?z = 22 x + 5y?2z =...
Solve the following system by Gauss elimination: x + 2y?z = 22 x + 5y?2z = ?17 x + 17y + 5z = ?1. Solve the system in from above by using Cramer’s rule. First discuss the applicabililty of Cramer’s rule to the system.
Show how to solve a non-separable partial differential equation using fourier transforms, and briefly explain each...
Show how to solve a non-separable partial differential equation using fourier transforms, and briefly explain each step.
Using Matlab please answer problem 1, part a . Please explain for part a. 1. MATLAB...
Using Matlab please answer problem 1, part a . Please explain for part a. 1. MATLAB Script Files (a) Experiment with vectors in MATLAB. Try the following: iset = -3 :11; iset cos( pi*iset/4) Explain how the last example computes the different values of cosine without a loop.
Solve using Matlab three problems: One problem using the combination formula One problem using the permutation...
Solve using Matlab three problems: One problem using the combination formula One problem using the permutation of n objects formula One problem using the permutation of r objects out of n objects formula - please make up three different questions for the three different commands - screenshots of everything on Matlab is needed
Using Matlab, solve the following ODE using Euler's method... I have to perform solve the ODE...
Using Matlab, solve the following ODE using Euler's method... I have to perform solve the ODE with both step sizes and plot both on the same graph. y'=1/y, Initial Condition y(0)=1. step size = 0.1 and 0.01 The interval is from 0 to 1. UPDATE: I actually figured it out myself! THANKS