Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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]

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


Set Soldner's constant

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Solved


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

nästan 3 år ago

Load more