Sum along each diagonal of a matrix
Write a routine that returns the sums along the diagonals of a given matrix, A, where the first diagonal is the bottom left corn...
Draw a fancy '7' in a zero matrix!
Given a x-by-x matrix filled with zeros (x is odd and > 3). Use 7s to draw a number 7 into it! Like this:
x = 5, y =
7 7 7 7 7...
Efficiency of a single phase Transformer
Calculate the efficiency of a single phase transformer whose KVA rating is A KVA, loading factor x,power factor p,full load copp...
4ヶ月 前
解決済み
Compute average gain for some bets.
Given a vector containg the odds of some events in decimal format (e.g., |odds=[1.3 2.5 1.5]| ) and a vector of the same dimensi...
4ヶ月 前
解決済み
Permutation Via Multiplication
Given two numbers a and b, determine if the product ab is a permutation of the digits of a. For example, this is always true for...
4ヶ月 前
解決済み
Let's create histogram data by yourself.
We'd like to create histogram data, which first column shows the data, and second column shows the frequency.
input = [1, 2, 1,...
4ヶ月 前
解決済み
Dial Up
Each number on telephone keypads, except 0 and 1, corresponds to a set of uppercase letters as shown in this list:
2 ABC, 3 DEF...
4ヶ月 前
解決済み
Set a Soroban Abacus
*Description*
This problem is the inverse of <http://www.mathworks.com/matlabcentral/cody/problems/136-read-a-soroban-abacus ...
Center of Mass(es) in 3D Space
Given a matrix of format [x1,y1,z1,m1; x2,y2,z2,m2 . . .], return the center of mass of all listed points in 3d space [xc,yc,zc]...