MATLAB Code:
close all
clear
clc
A = [0.1 0.2 0.3 0.4; 0.4 0.3 0.2 0.1; 0.3 0.1 0.4 0.2; 0.2 0.4
0.1 0.3];
B = [0.1 0.2 0.3 0.4; 0.4 0.3 0.2 0.1; 0.3 0.1 0.4 0.2; 0.2 0.4 0.1
0.29];
C = [0.1 0.2 0.3 0.4; 0.4 0.3 0.2 0.1; 0.3 0.1 0.4 0.2; 0.2 0.4 0.1
0.31];
fprintf('Part
(a)\n----------------------------------------\n')
disp(A^10000)
fprintf('\nPart
(b)\n----------------------------------------\n')
disp(B^10000)
fprintf('\nPart
(c)\n----------------------------------------\n')
disp(C^10000)
fprintf('\nPart
(d)\n----------------------------------------\n')
fprintf('The only difference between A, B and C is the last
element.\n')
fprintf('Elements of B^10000 are much less than that of
A^100000,\n')
fprintf('and the elements of C^10000 are much larger than that of
A^100000.\n')
fprintf('\nSum of the entries of each row of A:\n')
for i = 1:size(A,1)
fprintf('\t%.4f\n', sum(A(i,:)))
end
fprintf('Sum of the entries of each row of B:\n')
for i = 1:size(B,1)
fprintf('\t%.4f\n', sum(B(i,:)))
end
fprintf('Sum of the entries of each row of C:\n')
for i = 1:size(C,1)
fprintf('\t%.4f\n', sum(C(i,:)))
end
fprintf('Sum of the entries of each column of A:\n')
for i = 1:size(A,2)
fprintf('\t%.4f', sum(A(:,i)))
end
fprintf('\nSum of the entries of each column of B:\n')
for i = 1:size(B,2)
fprintf('\t%.4f', sum(B(:,i)))
end
fprintf('\nSum of the entries of each column of C:\n')
for i = 1:size(C,2)
fprintf('\t%.4f', sum(C(:,i)))
end
fprintf('\n')
Output:

6.) Use Matlab or another software program to calculate the following. a. Let A=.1.2.3.4;.4.3.2.1;.3.1.4.2;.2.4.1.3. Find A^10000....
% Use MATLAB to build a simulation of Quiz 2.3. simulate the transmission % of 10000 packets, each containing 100 bits. Count the number of packets % that abilities. Also calculate the probability of a packet is decoded % correctly. Compare your numbers from MATLAB with your theoretical % calculation. (Hint: look at Example 2.25.) -close all -clear all clc x = randi ( [0 1] , 100, 10000) ; numel (X) -nume l (X (find (Х--1 ) ) )...
2. (10 pts. Please perform the following calculations via MATLAB a. Calculate e3!/pi and round the answer to the nearest integer (all via MATLAB commands) b. Calculate cos(wt) for t (time) from 0 seconds to 10 seconds (with 1 second increments – created via colon operator) where w = 30°/seconds c. Please sort the values of the vector given below from smallest to largest and save it as another single column vector and G = [68, 83,61, 70, 75, 82,57,5,...
cope the code please
thanks
Write a MATLAB code to obtain the following. Keep your code commented whenever required. Copy your source code and command widow outcomes and screen shots of any plots in your solution. Generate a matrix "A" as follow. A= 16 6 8 2 10 18 12 14 4 I. II. Divide the matrix A by 2 and store the result in a matrix B. Combine matrices A & B to obtain the following matrix C. Also...
QUIZ 2.3
EXAMPLE 2.25
Please help me build the MATLAB code
Use MATLAB to build a simulation of Quiz 2.3. Simulate the transmission of 10000 packets, each containing 100 bits. Count the number of packets that contain no error, one, two, three- bit errors, calculate their probabilities. Also calculate the probability of a packet is decoded correctly. Compare your numbers from MATLAB with your theoretical calculation. (Hint: look at Example 2.25.) Data packets containing 100 bits are transmitted over a...
Matlab answer only
Form 1 6) [10 pts] Consider the following two matrices B=[S A 3 1 5 -7 4 6-3] a) Obtain the sum of each row of matrix A. b) Use the size function to create a magic matrix P which has the same size as matrix A. c) Create a matrix called Q from the second column of matrix A d) Extract the four numbers in the lower left-hand corner of matrix A and create matrix R....
Can you help me with this question please? For the code, please
do it on MATLAB. Thanks
7. Bonus [3+3+4pts] Before answering this question, read the Google page rank article on Pi- azza in the 'General Resources' section. The Google page rank algorithm has a lot to do with the eigenvector corresponding to the largest eigenvalue of a so-called stochastic matrix, which describes the links between websites.2 Stochastic matrices have non-negative entries and each column sums to1, and one can...
1- Correct the syntax errors in the following program, and rewrite the program so that it follows the proper style conventions. What does the program do? (Write it out as a comment). (10 pts) #include <stdio.h> int main() {/* * Calculate and display the difference of two values *) int X, /* first input value */ x, /* second input value */ sum; /* sum of inputs */ X=9, x=7.5 X + x = sum; printf("%d + %d = %d\n";...
For all the exercises below you may use MATLAB to check your answers, but you must solve everything by hand and show all your working. 2. Consider the system of equations Ax b described by: BAEJEHE 2 1 1 -1 2 k 2 -4 9 3-6k k+1 ion where k is an unknown constant. (a) Perform row operations on the augmented matrix Ab] to get as close as you can to row echelon form without knowing the value of k....
4-6 on matlab
4. Write a program in a script file that determines the real roots of a quadratic equation ax2+bx+c 0 When the file runs, it asks the user to enter the values of the constants a, b, and c. To calculate the roots of the equation the program calculates the discriminant D, given by: D b2-4ac When D 0, the program displays message "The equation has two roots," and the roots are displayed in the next line. When...
Award: 10.00 points Use MegaStat, MINITAB, or another software package to perform Tukey's test for significant pairwise differences. Perform the test using both the 5 percent and 1 percent levels of significance. One particular moming. the length of time spent in the examination rooms is recorded for each patient seen by each physician at a orthopedic clinic. Time in Examination Rooms (minutes) Physician 3 18 Physician 2 33 38 33 28 Physician 1 32 Physician 4 26 34 24 29...