A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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]

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


Set Soldner's constant

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

A résolu


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

plus de 3 ans il y a

Charger plus