Amee Shah
Content Feed
문제를 풀었습니다
Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27
1년 초과 전
문제를 풀었습니다
Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.
1년 초과 전
문제를 풀었습니다
Mechanical Advantage of a Gear Train
Calculate the mechanical advantage of a gear train. The mechanical advantage of a gear couple is given by MA = T_o/T_i where ...
1년 초과 전
문제를 풀었습니다
Energy of an object
Calculate the total mechanical energy of an object. Total Energy= Potential energy + Kinetic energy P.E.=m*g*h K.E.=1/2...
1년 초과 전
문제를 풀었습니다
Electrical Diode Current Calculation
In engineering, there is not always a single equation that describes a phenomenon accurately enough to be applied in all instanc...
1년 초과 전
문제를 풀었습니다
Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)
1년 초과 전
문제를 풀었습니다
Vandermonde Matrix
Create the Vandermonde Matrix of the given vector. The matrix consists of columns as powers of the vector, so the first column i...
1년 초과 전
문제를 풀었습니다
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 ...
1년 초과 전
문제를 풀었습니다
Union Jack Matrix
Create a matrix of odd dimensions that has ones on both diagonals and dividing the matrix into 4 quadrants, resembling a square ...
1년 초과 전
문제를 풀었습니다
Create a square matrix with given conditions
Create a square matrix, M, which should be populated as follows: M = [ n^2 n * (n-1) n * (n-2) ... n * 2 n * ...
1년 초과 전
문제를 풀었습니다
System of equations
Find a solution to a system of equations represented by a |n| by |n+1| matrix. For instance, [ 2 0 4; => 2*x = 4 ...
1년 초과 전
문제를 풀었습니다
Combined Ages 1 - Symmetric, n = 3
You have probably seen the common riddle wherein combined ages are provided and you must determine the individual ages. For exam...
1년 초과 전
문제를 풀었습니다
Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)
1년 초과 전
문제를 풀었습니다
An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:* Many important observations in math and science can be described by short, but powerful, equations...
1년 초과 전
문제를 풀었습니다
Draw 'P' !!!
Draw a n by n matrix 'P' using 0s and 1s. (n is odd and greater than 4) if n=5 , then the output will be [1 1 1 1 1 1 0 0 0...
1년 초과 전
문제를 풀었습니다
Odd row
Create a row 'y' with odd numbers where the potential maximum number is given by 'x' and the space between them by 'm'. The firs...
1년 초과 전
문제를 풀었습니다
Sum of digits of powers of 2
Given n, first, calculate the number 2^n. Then, sum the digits that comprise that number. For example: Input: n = 7 2^n = ...
1년 초과 전