解決済み


Pass the Threshold!!
Write a Matlab function that will take as input a matrix of arbitrary dimensions and a scalar threshold value, and return a vec...

7年以上 前

解決済み


Cumulative minimum of an array
Find the cumulative minimum of an array without using the built-in function <http://www.mathworks.com/help/matlab/ref/cummin.htm...

7年以上 前

解決済み


Fill the Matrix - 2
Input is a column vector and n. n columns will be added to the left of the input column. The first value of the row is the me...

7年以上 前

解決済み


Find argmax of a function
You are given vectors x and y (=f(x)). Return the element of x for which f(x) is maximized.

7年以上 前

解決済み


Divide elements by sum of elements
In this problem, I ask you to write a function which will divide the elements of each column by the sum of the elements of the s...

7年以上 前

解決済み


Vector to 3-Column Matrix
Consider a vector *A* such as A = [1 2 3 3 4 5 6] Can you convert this vector to a three-column matrix like this: ...

7年以上 前

解決済み


Sort Reversal
There are n index cards in a row, with n distinct integers written on them (one number per card) so that the numbers are sorted ...

7年以上 前

解決済み


007: Chinese Barrack Invasion
*MISSION:* Successfully invade a military barrack located in China. *WARNING:* There is a row of _n_ security switches protec...

7年以上 前

解決済み


Five Fingers
A little girl has just learnt how to count from 1 to N using the five fingers of her left hand as follows. She starts by calling...

7年以上 前

解決済み


Seperate array to small section according to its index position
Given a integer n, we can generate a sequence [0,1,2,3,4,..., 2^n-1], then we separate it to two sequence according to their ind...

7年以上 前

解決済み


The Google Interview: Two Eggs Problem
Consider the following problem, a popular Google interview question: A firm has invented a super-strong egg. For publicity pu...

7年以上 前

解決済み


God of War: The Chains Of Olympus
The Spartan warrior, Kratos, is held by a chain of _n > 1_ links in the underworld. His only chance of survival is to break the ...

7年以上 前

解決済み


Counting Squares
An algorithm starts with a single square and on each of its next iterations adds new squares all around the outside as shown bel...

7年以上 前

解決済み


Penny Distribution Machine
A machine consists of a row of boxes. To start, one places N pennies in the leftmost box. The machine then redistributes the pen...

7年以上 前

解決済み


Replace secondary diagonal elements of a square array
Replace all the secondary diagonal elements of the square array A with the number n Example: A = [1 2 3 4 5 6 ...

7年以上 前

解決済み


Cumulative maximum of an array
Find the cumulative maximum of an array without using the built-in function <http://www.mathworks.com/help/matlab/ref/cummax.htm...

7年以上 前

解決済み


Block average ignoring NaN values
Given a matrix, calculate the block average of each disjoint sub-matrix while ignoring *NaN* values. Assume that the size of the...

7年以上 前

解決済み


Matrix multiplication across rows
Given matrix m, return matrix n such that, rows of n are result of multiplication of the rows of the input matrix Example ...

7年以上 前

解決済み


A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...

7年以上 前

解決済み


Matrix of Multiplication Facts
This is James's daughter again, sneaking into his Cody account. Thanks to your help in my math class last year, I did great! B...

7年以上 前

解決済み


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

7年以上 前

解決済み


Are you in or are you out?
Given vertices specified by the vectors xv and yv, and a single point specified by the numbers X and Y, return "true" if the poi...

7年以上 前

解決済み


Volume of a Parallelepiped
Calculate the volume of a Parallelepiped given the vectors for three edges that meet at one vertex. A cube is a special case ...

7年以上 前

解決済み


Clock Hand Angle 1
Given a time in HH:MM:SS, find the smallest angle (in degrees) between the hour and minute hand

7年以上 前

解決済み


Covering area
As an extension of the problem <http://www.mathworks.com/matlabcentral/cody/problems/416-polygon-area>, find the area, bounded b...

7年以上 前

解決済み


Find the stride of the longest skip sequence
We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....

7年以上 前

解決済み


Golomb's self-describing sequence (based on Euler 341)
The Golomb's self-describing sequence {G(n)} is the only nondecreasing sequence of natural numbers such that n appears exactly G...

7年以上 前

解決済み


Spherical radius given four points
Determine the radius of a sphere provided four non-coplanar points on the surface of the sphere. pts = [x1 y1 z1; x...

7年以上 前

解決済み


Is X a Fibonacci Matrix?
In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...

7年以上 前

解決済み


Nodal Voltage of Resistor Ladder Network
* You have a bunch (an even number N) of identical resistors (each R ohms), a good battery (V volts) and a high impedance voltme...

7年以上 前

さらに読み込む