解決済み


Factorial !
Calculate the factorial of a non-negative integer without using the built in function *factorial*

5ヶ月 前

解決済み


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

5ヶ月 前

解決済み


Matrix Construction I
Given n, construct a matrix as shown in the example below. Example For n=8, the output should look like this: 1 2 3 4 ...

5ヶ月 前

解決済み


Toeplitz Matrix
For a given square matrix of order n-by-n check whether this is a Toeplitz matrix or not. Return true if it is.

5ヶ月 前

解決済み


(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

5ヶ月 前

解決済み


Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

5ヶ月 前

解決済み


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

5ヶ月 前

解決済み


Subtract two positive numbers
Given a and b as a string, return b-a without using string to number conversion functions. a and b must to be a same size and b ...

5ヶ月 前

解決済み


index of n^2 in magic(n)
input=5 magic matrix 17 24 1 8 15 23 5 7 14 16 4 6 13 20 22 10 ...

5ヶ月 前

解決済み


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

5ヶ月 前

解決済み


Create an n-by-n null matrix and fill with ones certain positions
The positions will be indicated by a z-by-2 matrix. Each row in this z-by-2 matrix will have the row and column in which a 1 has...

5ヶ月 前

解決済み


Determine the number of odd integers in a vector
Determine the number of unique odd integers in a vector. Examples: Input x = [2 5 8 3 7 1]; Output y = 4; Inp...

5ヶ月 前

解決済み


Determine the mean of matrix
Determine the mean of matrix without using mean function Hint: use simple algorithm

5ヶ月 前

解決済み


Transpose of matrix
Transpose of matrix as per test cases

5ヶ月 前

解決済み


find nth even fibonacci number
1st even fibonacci number=2 ; 2nd even fibonacci number=8 ..

5ヶ月 前

解決済み


generate the matrix
given a value n (say 4) - generate the matrix like below y= [0 1 2 3 4; -1 0 1 2 ...

5ヶ月 前

解決済み


Calculating large fibonacci numbers
The fibonacci sequence starts 1,1,2,3,5,8... Find the the n'th fibonacci number. Then calculate round(log10( . )) of that n't...

5ヶ月 前

解決済み


Find the sequence
Find the nth number of a sequence. Check the test suite to determine the sequence. * hint: it is closely related to familiar ...

5ヶ月 前

解決済み


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

5ヶ月 前

解決済み


Find the complement of a number in binary
Input x is a decimal number and output y is the complement of binary representation of x. For example, x = 10 has the binary ...

5ヶ月 前

解決済み


Rearrange string
Input is a given string. Output is the number of ways to rearrange the string.

5ヶ月 前

解決済み


Cody problems in French : Trouvez la logique Pt.2
Trouvez la logique entre x et y, aidez-vous de la test suite. Bon courage. P.S: L'utilisation de "^" est de nouveau fortement...

5ヶ月 前

解決済み


Day counter function
Write a function called _day_counter_ that returns the number of Mondays that fell on the first day of the month in a given year...

5ヶ月 前

解決済み


Recursion - Fun
Generate the first k terms in the sequence a(n) define recursively by a(n+1)=p*a(n)+(1+a(n)) with p=0.9 and a(1)=0.5 ...

5ヶ月 前

解決済み


Solve equation numerically
y'=y In order to solve equation using computer, numerical analysis are needed. 1st order Euler's method is one of the metho...

5ヶ月 前

解決済み


Two dimensional moving average
A=[1 2 3 4 5 1 2 2 2 3 2 3 3 3 4 1 1 4 4 2] B=[1 1;1 1]; % This is can be used for weight factor of moving a...

5ヶ月 前

解決済み


Rotate Matrix Both Direction (45 Degree)
*Matrix (3x3 only) rotation*: 3 inputs: *x* matrix, *n* times and *m* option. output: *y* matrix with *n x 45* degree ...

5ヶ月 前

解決済み


Scalar Matrix Manipulation
Assume, input x is a scalar matrix such as, x = 2 0 0 0 2 0 0 0 2 th...

5ヶ月 前

解決済み


Calculate geostrophic current
eta0=0.01; R=300; f=0.01; g=9.81; x=-500:50:500; y=-500:50:500; [x y]=meshgrid(x,y); eta=eta0*exp(-(x.^2+...

5ヶ月 前

解決済み


Find the distance traveled by a car given velocity and time.
A car is traveling at a constant velocity for a specific amount of time. The function should use the two inputs, velocity and ti...

5ヶ月 前

Load more