Diagonal Product of A Square Matrix
For a matrix A, calculate the product of its diagonal elements.
* Assume all input matrices are square & corresponding element...
7ヶ月 前
解決済み
Box
Give the volume of a box, x is equal to the body diagonal.
7ヶ月 前
解決済み
free points
function y = your_fcn_name(x)
y = x(1)+x(2);
end
7ヶ月 前
解決済み
Approximate the cosine function
Without using MATLAB trigonometric functions, calculate the cosine of an argument x to a precision of 0.0001
Hint: You may wish...
Change on Spiral Matrix
n>=3, generate a matrix of nth such that n^2 is the max number, and max number must be in [1,1] or [end, end]. One example will ...
7ヶ月 前
解決済み
generate capital english alphabets
Based on the numeric input 'n', generate the capital english alphabet starting from A till the english alphabet at the 'n'th pos...
7ヶ月 前
解決済み
Draw the symbol '+'
Draw '+' in an x-by-x matrix (where x is odd and x >3)
Example:
x = 5
y = [0 0 1 0 0
0 0 1 0 0
1 1 1 1 1
0 ...
A shooting competition
In a shooting competition, the target is a square of side L containing a circle of radius R<=L/2. A player scores one point if h...
7ヶ月 前
解決済み
Total resistance of resistors in parallel
What is the total resistance of a number of resistors in parallel?
A vector R contains the resistances (in Ohm) of n resistors,...
Fletcher-Reeves Conjugate Gradient Method
Write a function to find the values of a design variable vector, _x_, that minimizes an unconstrained scalar objective function,...
7ヶ月 前
解決済み
Generalized sorting
Write generalized sort function |sortg()| that sorts array elements in “ascending” order with given comparison funct...