Question

Peristaltic pumps deliver highly viscous fluids to networks of pipes/tubes. Solve the system given the set of linear equation

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Given equations are: 75 204+Q3 +294 9.-Q-By -204481226 -0 8-04-QS = 0 -24+24 50 . 95-Q6-Qzzo Writing the given linear equatio

For this problem no pivoting is needed, so Gauss naive and gauss pivot method are same.

MatLab program for matrix solver

clear all
clc
close all
% given data
A=[1 0 0 0 0 0 0
   0 -2 1 2 0 0 0
   1 -1 -1 0 0 0 0
   0 0 0 -2 1 2 0
   0 0 1 -1 -1 0 0
   0 0 0 0 0 -2 3
   0 0 0 0 1 -1 1];
b=[5;0;0;0;0;0;0];
Q=A\b

Screenshot

Ona 1 clear all 2 clc 3 close all 4% given data 5 A=[1 0 0 0 0 0 0 0 -2 1 2 0 0 0 1 -1 -1 0 0 0 0 0 0 0 -2 1 2 0 0 0 1 -1 -1

Save the above program and execute it.

Result

Q = 5.0000 2.8049 2.1951 1.7073 0.4878 1.4634 0.9756

Gauss elimination method

clear all
clc
% inputs
% no. of equations
n=7;
% setting A and b matrix
A=[1 0 0 0 0 0 0
   0 -2 1 2 0 0 0
   1 -1 -1 0 0 0 0
   0 0 0 -2 1 2 0
   0 0 1 -1 -1 0 0
   0 0 0 0 0 -2 3
   0 0 0 0 1 -1 1];
b=[5;0;0;0;0;0;0];
% agumented matrix
AB=[A b];
% forward elimination
for i=1:1:n-1
    for j=i+1:n
AB(j,:)=AB(j,:)-(AB(j,i)./AB(i,i)).*AB(i,:);
    end
end
% backward elimination
X=zeros(n,1);
X(n,1)=AB(n,n+1)/AB(n,n);
for i=n-1:-1:1
    summ = AB(i,n+1);
    for j = i+1:n
        summ = summ-AB(i,j)*X(j,1);
    end
X(i,1)=summ/AB(i,i);
end
fprintf('The results is: Q=\n');
disp(X);

Screenshot

10 1 clear all 2 clc 3% inputs 4% no. of equations 5 n=7; 6% setting A and b matrix 7 A=[1 O O O O O O 0 -2 1 2 0 0 0 1 -1 -1

Save the above program and execute it.

Result

The results is: Q= 5.0000 2.8049 2.1951 1.7073 0.4878 1.4634 0.9756

I hope this will help you.

Add a comment
Know the answer?
Add Answer to:
Peristaltic pumps deliver highly viscous fluids to networks of pipes/tubes. Solve the system given the set...
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. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
Active Questions
ADVERTISEMENT