解決済み


Elements with highest local average
Input v is a row vector such that length(v)>3. Consider a sliding window of length 3 that is used to calculate the local average...

3年弱 前

解決済み


How to reverse spdiags?
The spdiags function extracts all nonzero diagonals from the m-by-n matrix A. So if A=[1 2 3;4 5 6;7 8 9], spdiags(A)=[7 4...

3年弱 前

解決済み


Find the same and successive values in a vector
Find the same and successive values in a vector. For example: Input x = [ 1 0 0 1 1 1 1 0 1 1 1 0 0 0 1 ] Start and end...

3年弱 前

解決済み


Longest Sequence of NaNs
In an array return the length of longest sequence of nans for each column. x = [ 2 3 1 2 5 6; nan nan 5 n...

3年弱 前

解決済み


Sum My Indices
Given inputs M and N (in that order), output an MxN matrix whose entries are equal to the sum of their indices. Example input...

3年弱 前

解決済み


Combine Data With Gaps
Combine data sets a and b where the datasets have "gaps" or unique points. Example: Input a = [1,0; 2,1; ...

3年弱 前

解決済み


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

3年弱 前

解決済み


Temperature Conversion Utility (Strings)
This is a follow-on problem to <http://www.mathworks.com/matlabcentral/cody/problems/2413-temperature-conversion-utility Problem...

3年弱 前

解決済み


Temperature Conversion Utility
There are a few problems on Cody regarding temperature conversion (C to K, C to F, F to C), but none include Rankine. Furthermor...

3年弱 前

解決済み


Converting Decimal to Binary
Given a decimal number that may include a fractional component, convert it into binary representation. The numbers you are given...

3年弱 前

解決済み


Shuffle
Shuffle a vector by breaking it up to segments of |n| elements, and rearranging them in a reversed order. For example, the ve...

3年弱 前

解決済み


Vector pop
Take |n| elements from the end of the vector |v| and return both the shorten vector |v| and the |n| elements in a separate vecto...

約3年 前

解決済み


Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

約3年 前

解決済み


Product of Each Column
Given a matrix |mat| with |n| columns, return a row vector |v| of length |n|, where every element in |v| is the product of the |...

約3年 前

解決済み


Concatenated roots
Which is the value of this infinte concatenated roots? <<https://s27.postimg.org/i4hkin7xf/Code_Cogs_Eqn.gif>> Note: If ...

約3年 前

解決済み


Church Encoding
Church encoded numeral is a function which takes two arguments _f_ and _x_ and applies _f_ to _x_ several times. For example,...

約3年 前

解決済み


Negative without '-'
Simple: return a negative number without using the '-' sign. Thanks to Problem <https://www.mathworks.com/matlabcentral/cody/...

約3年 前

解決済み


Calculate the hypotenuse of a right triangle without using ^ and sqrt ()
Find out the hypotenuse of right triangle. Say a = 4, b = 3 then c = 5 Please don't use ^ and sqrt() function.

約3年 前

解決済み


Determinant without using det()
Given a square matrix A, compute the <http://en.wikipedia.org/wiki/Determinant determinant> of A. Note that you may not use t...

約3年 前

解決済み


Number of even divisors of a given number
Given a Number n, return the number of its even divisors without listing them. example: n=14 ; EvenDivisors={2,14} ; y=2 ...

約3年 前

解決済み


Accurate Division
Given three integers x, y and d, return x/y (as a string) to d significant digits. Remove leading and trailing zeros. Example...

約3年 前

解決済み


Mmm! Multi-dimensional Matrix Multiplication
You have got a couple of multi-dimensional matrices, A and B. And want to multiply them. For the first 2 dimensions, an ordinary...

約3年 前

解決済み


Make an N-dimensional Multiplication Table
*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

約3年 前

解決済み


Multiplication
Multiply two numbers in a different manner. The numbers are given to you as vectors x and y. Example x = [ 1 2 0 1 ] ...

約3年 前

解決済み


modular arithmetic
Given three integers a,b and c, find the remainder when a^b is divided by c. Here, a^b will be well beyond the largest 64 bit in...

約3年 前

解決済み


Solve Sudoku puzzle step by
Sudoku is a famous puzzle. <https://en.wikipedia.org/wiki/Sudoku> Give a standard sudoku by a matrix (9*9), You need give a ...

約3年 前

解決済み


Sudoku Solver - Standard 9x9
Solve a Standard 9x9 <http://en.wikipedia.org/wiki/Sudoku Sudoku>. Values 1 thru 9 occur in each row, column, and the nine non-o...

約3年 前

解決済み


The sliding puzzle: 15
If you are unfamiliar with the sliding puzzle, enter the command fifteen in your MATLAB command window (or search online, of cou...

約3年 前

解決済み


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

約3年 前

解決済み


Sudoku square
We have a small Sudoku square, but one number is missing. x = [ 1 5 4 8 6 3 0 9 7 ] Make a function, wher...

約3年 前

さらに読み込む