解決済み


Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

9年弱 前

解決済み


Vector Linear sum: (p1-m1)V1+(p2-m2)V2+...(pK-mk)Vk
Calculate the sum of a Vector times coefficients expressed as two strings. Example: Normal representation [ a b c ], [ p1 ...

9年弱 前

解決済み


drowsy?
This dog() may be drowsy or function immediately when you call, return 1 or 0 accordingly within 2/10 second.

9年弱 前

解決済み


The rabbit problem
Someone discovered that rabbits reproduce at the rate of fibonnaci so you just input the number and it will print the fibonnaci ...

9年弱 前

解決済み


Simple problem creating a function from an abstract specification.
MYSTERYFUNCTION3 This takes a vector of numbers v and computes a vector w such the w[i] is the average of v[i] and the previous...

9年弱 前

解決済み


Procrustean bed
Given a vector x and an integer n, convert x to a vector of length n by (1) chopping off the end if it is too long, or (2) addin...

9年弱 前

解決済み


Test within tolerance
Given a vector of experimental data, D, and a vector of truth data, T, return FALSE if any +/- errors (D-T) are outside a given ...

9年弱 前

解決済み


User defined nextpow function
Create a function which will take 2 arguments as n and x, and return y, where, n^y >= abs(x). [ Similar to builtin "nextpow2" fu...

9年弱 前

解決済み


Create a matrix with difference of each row of input matrix
With a given input matrix A, create a output matrix B in such a way that each row in B is a difference of rows of input matrix A...

9年弱 前

解決済み


Generate binary combinations for a given number of bit(s)
Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

9年弱 前

解決済み


Parallel vectors
Return true or false depending on whether 2 vectors are parallel or not. Vectors can be 2 or 3 dimensional. The origin is not c...

9年弱 前

解決済み


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

9年弱 前

解決済み


Soccer - TOTO
How many different outcomes are there in a soccer-TOTO with n games? For each game there are three results: win - loss - equa...

9年弱 前

解決済み


Complex transpose
Calculate the transpose of a matrix having complex numbers as its elements without changing the signs of the imaginary part. ...

9年弱 前

解決済み


Sum Rows
Sum the same indexed (unique) rows. Examine the test suite. Related Challenge - <http://www.mathworks.com/matlabcentral/cody/...

9年弱 前

解決済み


Convert a vector of Integers into a matrix of binaries
Convert a vector of positive integers into a matrix containing their binary representation. Each column of the output contains t...

9年弱 前

解決済み


Reverse CHECKBOX MATRIX with 69
Create a reverse checkbox matrix with '69'. Where the size is the input and output will be a square checkbox matrix. Exa...

9年弱 前

解決済み


Project Euler: Problem 16, Sums of Digits of Powers of Two
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^N? Thanks ...

9年弱 前

解決済み


Reverse Calculator
Use this reverse calculator and give correct output Its simple, In my Reverse calculator if you press 0 it will be considered...

9年弱 前

解決済み


Snakes on a plane
Given the dimensions of a 2-d plane, create a matrix where a "snake" of ones occupies the plane from top left to bottom right. ...

9年弱 前

解決済み


If you have matrix A, create matrix B using matrix A as an "element"
A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

9年弱 前

解決済み


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifmq zpv...

9年弱 前

解決済み


チェッカーボードを作ろう
整数 n が与えられた時、以下の様な1と0を含むn×nの行列を作成しましょう。a(1,1) は1にする必要があります。 例: 入力 n = 5 出力 a が [1 0 1 0 1 0 1 0 1 0 ...

9年弱 前

解決済み


JOIN STRINGS
There are two given strings 'STRING1' and 'STR ING2'.|monospaced|The output should be 'STRING1 STR ING2' or STr1='Sum';STr2='EQU...

9年弱 前

解決済み


The sum of individual numbers...
Well this one is taking a number and then summing the individual parts till you reach a value of 1, 2, 3, 4, 5, 6, 7, 8, 9, or 0...

9年弱 前

解決済み


Find Rotated Substring
Given a string s1, find if a rotated version of s1 is present in a second string s2. For example, rotated version of some str...

9年弱 前

解決済み


Creating a code via test suite :)
Given the test suites, create a code that would fit them :) *Clue: Pascal's Triangle

9年弱 前

解決済み


My Problem, Find the square of the horizontal concatenation of the third and fifth elements of a vector.
given the 1x5 vector x, y must be the square of the horizontal concatenation of the third and fifth elements. So, if x = [1 1 1 ...

9年弱 前

解決済み


Feeling lucky?
Guess which number Cody is thinking (1 to 10)? (This is a game of luck more than skill. Good luck!)

9年弱 前

解決済み


Convert Hard Drive marketing sizes to actual data sizes
Hard drive sizes are typically marketed using the decimal meaning of prefixes, whereas RAM uses binary meanings. For example: ...

9年弱 前

さらに読み込む