Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...
5 years ago
Solved
Add a vector to a matrix
Given a matrix |mat| of size |mXn| and a row vector |v| of size |1Xs|, return a matrix with |m+1| rows that conatains |mat| over...
5 years ago
Solved
Diagonal Pattern
For a positive integer |n|, return an |nXn| matrix |mat| such that the value of each element in row |i| and column |j| is given ...
5 years ago
Solved
Find the average of a random sequance
Write a function that generates random integers within a loop, and calculates the mean of the positive numbers only.
At each ...
5 years ago
Solved
Approximate the cosine function
Without using MATLAB trigonometric functions, calculate the cosine of an argument |x| to a precision of |0.0001|
*Hint:* You ...