已解决


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

3 years 前

已解决


MATLAB Basics: Complex Numbers
For a given complex number, x, return the real and imaginary parts as a vector, y = [Real Imaginary].

3 years 前

已解决


Find out characteristics equation of given matrix.
Find out characteristics equation of given matrix. A=[0 2; 1 8] then char. eq is s^2-8*s-2=0 and answer should be [1 -8 -2]

3 years 前

已解决


List the nth prime quartet prefix
Prime numbers larger than 5 can end only in 1, 3, 7, or 9, but of course not all numbers ending in these four digits are prime. ...

3 years 前

已解决


Roman numbers: how old is that building?
The front of old buildings sometimes show the year when they were built in roman numbers. These number are rather confusing and ...

3 years 前

已解决


Minimum jumps to reach end of the array
Given an array of integers where each element represents the max number of steps that can be made forward from that element. Ste...

3 years 前

已解决


Write script that gives matrix like the following example:)
if x=2; y=[2 1; 1 1] if x=4; y=[4 3 2 1 3 3 2 1 0 2 2 1 0 0 1 1] if x=5; y=[5 4 3 2 ...

3 years 前

已解决


Draw matrix 'Swiss flag'( Euro 2020)
Draw a x-by-x matrix 'Swiss flag' using '1' and 0.(x is odd and bigger than 4) Example x=5 ans = [1 1 1 1 ...

3 years 前

已解决


Draw a x-by-x matrix 'Denmark flag'(Euro(2020)
Draw a x-by-x matrix 'Denmark flag' using '4' and '1'.(x is odd and bigger than 4) Number 4: Caption S.Kjær and number 1: K.S...

3 years 前

已解决


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

3 years 前

已解决


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

3 years 前

已解决


Gallery function, learning
write a Function, edit something or Add something that give us like the following for random n: n=2 ans= [ 0 1 ...

3 years 前

已解决


Numbers spiral diagonals (Part 1)
Inspired by Project Euler n°28 et 58. A n x n spiral matrix is obtained by starting with the number 1 and moving to the right...

3 years 前

已解决


Divisors for big integer
Inspired by Problem 1025 and Project Euler 12. Given n, return the number y of integers that divide N. For example, with ...

3 years 前

已解决


Sum of big primes without primes
Inspired by Project Euler n°10 (I am quite obviously a fan). With problem n°250 by Doug, you can find some global methods to ...

3 years 前

已解决


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

3 years 前

已解决


Compute the sum of reciprocals of quadratics
Write a function to compute the following sum: See also Cody Problem 46000.

3 years 前

已解决


Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...

3 years 前

已解决


Generate a string like abbcccddddeeeee
This is the string version of Problem 1035. <http://www.mathworks.com/matlabcentral/cody/problems/1035-generate-a-vector-like-1-...

3 years 前

已解决


MATLAB Basics: Complex Argument
For a given complex number, x, return the argument, y, in degrees.

3 years 前

已解决


MATLAB Basics: Complex Conjugates
For a given complex number, x, return the complex conjugate, y.

3 years 前

已解决


Peg Solitaire - Apply Move
About Peg Solitaire . Previous Problem. Consider inital board; If we move the peg located on (4,6) to the left (4) directio...

3 years 前

已解决


Compute the harmonic numbers
The nth <https://mathworld.wolfram.com/HarmonicNumber.html harmonic number> is defined as the sum of the reciprocals of the inte...

3 years 前

已解决


X O X O
On a noughts and crosses board, how many possible unique combinations are there given a square grid of length n? Assumptions/...

3 years 前

已解决


World Cup 2018 Prediction!
Which team will be the winner?

3 years 前

已解决


Set Soldner's constant

3 years 前

已解决


Evaluate the zeta function for real arguments > 1
The <https://en.wikipedia.org/wiki/Riemann_zeta_function Riemann zeta function> is important in number theory. In particular, th...

3 years 前

已解决


Evaluate the logarithmic integral
The <https://en.wikipedia.org/wiki/Logarithmic_integral_function logarithmic integral> li(x) plays a role in number theory becau...

3 years 前

已解决


Evaluate the gamma function
The <https://mathworld.wolfram.com/GammaFunction.html gamma function> is a generalization of the factorial, and it appears in ma...

3 years 前

已解决


Numbers with prime factors 2, 3 and 5.
Make a function which takes one positive integer n and returns a matrix with the numbers of the form (2^i)*(3^j)*(5^k) which are...

3 years 前

加载更多