解決済み


Number of divisors of a given number
Given a Number n, return the number of his divisors without listing them example: n=14 ; Divisors={1,7,2,14} ; y=4 n=...

約10年 前

解決済み


Find the right x in a 1. order Polynomal (y = m*x+c)
Given two points in a Cartesian coordinate system, find the x-value, where polynomial of 1. order (y = m*x+c) is equal to a giv...

約10年 前

解決済み


Accessing values in a cell
You are given c, which is a 1xN cell array, and a and b, which are each two 1xM vectors. Your job is to give the bth value in t...

約10年 前

解決済み


Full combinations
Given n input vectors x1, x2, …, xn, generate a p*n matrix y whose rows contain all element-wise combinations of the vectors x1,...

約10年 前

解決済み


How many ways to write a number
Given two positive numbers n and k, where n>=k.In how many ways can we write n as sum of k positive numbers.Same numbers but dif...

約10年 前

解決済み


the "power matrix" of two vetcors
Given two row vectors x,y of lengths m and n (resp.), create an m x n matrix whose i,j entry is x(i)^y(j).

約10年 前

解決済み


Raise a polynomial to a power
In Matlab, polynomials are represented by a vector of coefficients. For example, the polynomial p=a*x^2 + b*x + c is represente...

約10年 前

解決済み


GJam March 2016 IOW: Clock Dance
This Challenge is derived from <http://code.google.com/codejam/contest/8274486/dashboard#s=p1 GJam March 2016 Annual I/O for Wom...

約10年 前

解決済み


Zelda - Rupee Count (Item Purchase)
Building off of <https://www.mathworks.com/matlabcentral/cody/problems/3025-zelda-rupee-count Problem 3025>, suppose that an arr...

約10年 前

解決済み


Zelda - Rupee Count (Compact)
Building off of <https://www.mathworks.com/matlabcentral/cody/problems/3025-zelda-rupee-count Problem 3025>, suppose that Link's...

約10年 前

解決済み


Zelda - Rupee Count
Rupees are the main currency in The Legend of Zelda games. The value of each rupee is determined by its color. Unfortunately, th...

約10年 前

解決済み


Letter and word frequency
Here is a task: You’re given a text file. Your first task is to create a variable in MATLAB which will hold the text given to...

約10年 前

解決済み


Net Present Value of a Stream of Cash Flows
Calculate <https://en.wikipedia.org/wiki/Present_value the net present value of a future cash flow> vector given; * future ca...

約10年 前

解決済み


Create array of all Distances between two Sets of Points
This Challenge is a subsection of <http://www.mathworks.com/matlabcentral/cody/problems/1110-usc-fall-2012-acm-martian-pranks Ma...

約10年 前

解決済み


GJam 2014 China Rd B: Sudoku Checker
This Challenge is derived from <http://code.google.com/codejam/contest/2929486/dashboard#s=p0 GJam 2014 China Sudoku>. Large Cas...

約10年 前

解決済み


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,...

約10年 前

解決済み


Create formatted value string Cell array of a vector
This Challenge is to create a cell array that contains strings of vector components in a given format. c=vector2formattedstri...

約10年 前

解決済み


GJam March 2016 IOW: Cody's Jams
This Challenge is derived from <http://code.google.com/codejam/contest/8274486/dashboard GJam March 2016 Annual I/O for Women Co...

約10年 前

解決済み


Unique: Faster for options 'rows' and 'stable' for large array of uint8
Challenge: Execute unique(a,'rows','stable') Faster for 'a' being uint8. The "unique" function for the 'rows' and 'stable' o...

約10年 前

解決済み


Big numbers, least significant digits
Given two numbers, x and n, return the last d digits of the number that is calculated by x^n. In all cases, d will be the number...

約10年 前

解決済み


Tribute to Ramanujan
The nth taxicab number, denoted as T(n), is defined as the smallest number that can be expressed as a sum of two positive algebr...

約10年 前

解決済み


Mystery problem
Given integer x between 1 and 50, return integer y=mystery(x), where mystery(1) = 111 mystery(6) = 809 ... mystery...

約10年 前

解決済み


Go-style solver
Consider a variation of the game Go where one player has gone ahead and placed several pieces all at once. Assuming that the sec...

約10年 前

解決済み


Bleed non-zeros to the right using REGEXP, and that sort of cheatcodess...
This one is quite similar to <http://www.mathworks.nl/matlabcentral/cody/problems/1998-bleed-non-zeros-to-the-right>. But thi...

約10年 前

解決済み


Functional inputs
Return an n-dimensional array whose elements are the results of a function over a set of vectors. The (i,j,k, ...n)th element...

約10年 前

解決済み


Is 3D point set Co-Planar?
This Challenge is to determine if four 3D integer points are co-planar. Given a 4x3 matrix representing four x,y,z integer poin...

約10年 前

解決済み


Placing Beads Neatly in a Box
You are given a string of n black and white beads. Your job is to pack them neatly into a square box. "Neatly" in this case mean...

約10年 前

解決済み


Fun with a compass
Each night for the past week, you have been having the same nightmare: You find yourself back in your junior high school geometr...

約10年 前

解決済み


Is my wife really right?
For every input, output the string 'yes' once. Example: [yes1, yes2] = YesSheIs('Am I right?', 'Do you love me?') yes1 = '...

約10年 前

解決済み


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...

約10年 前

さらに読み込む