Gelöst


Circular Shift Me
Given a vector v=[1 3 6 9 11], circular shift them while iterating m=[1 3 6 9 11; 11 1 3 6 9; 9 11 1 3 6; 6 9 11 1 3; 3 6 9 1...

mehr als 5 Jahre vor

Gelöst


Modified Upper Matrix Mock
Given a vector v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 0 3 6 9 11; 0 0 6 9 11; 0 0 0 9 11; 0 0 0...

mehr als 5 Jahre vor

Gelöst


generate nth pentatope number
https://en.wikipedia.org/wiki/Pentatope_number

mehr als 5 Jahre vor

Gelöst


remove numbers from a string
check the given string for any numbers.in case one is found,remove it.but the two portions should be separated. if more than one...

mehr als 5 Jahre vor

Gelöst


Persistent Usage
This Challenge is to implement the Matlab Persistent variable capability. Given a sequence of Calls to a function return the ...

mehr als 5 Jahre vor

Gelöst


Vector Linear sum: (p1-m1)V1+(p2-m2)V2+...(pK-mk)Vk
Calculate the sum of a Vector times coefficients expressed as two strings. Example: Normal representation [ a b c ], [ p1 ...

mehr als 5 Jahre vor

Gelöst


Unique: Faster 'rows' for large array of uint8
Challenge: Execute unique(a,'rows') Faster for 'a' being uint8. The "unique" function for the 'rows' options may be performe...

mehr als 5 Jahre vor

Gelöst


Sort complex numbers into complex conjugate pairs
Sort complex numbers into complex conjugate pairs. Example: Input x = [3-6i -1-4i -1+4i 3+6i] Sorted output = [-1 - ...

mehr als 5 Jahre vor

Gelöst


Two-output anonymous function?
Return a function handle that when applied to an input, it produces two outputs: the first is the same as the input, and the sec...

mehr als 5 Jahre vor

Gelöst


Guess Cipher
Guess the formula to transform strings as follows: 'Hello World!' --> 'Ifmmp Xpsme!' 'Can I help you?' --> 'Dbo J ifm...

mehr als 5 Jahre vor

Gelöst


Sums of cubes and squares of sums
Given the positive integers 1:n, can you: 1. Compute twice the sum of the cubes of those numbers. 2. Subtract the square...

mehr als 5 Jahre vor

Gelöst


Convert decimal to binary and then generate the minimum binary it can with jumbling
input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

mehr als 5 Jahre vor

Gelöst


Filter AC, pass DC
Input x is the sampled signal vector, may have both AC and DC components. Output vector y should not contain any AC component. ...

mehr als 5 Jahre vor

Gelöst


Implement zero-based indexing for Matrices
Given an input vector and position (which is zero based) output the value Example: x = [1 2; 4 5] pos = [0 1] value = 5 ...

mehr als 5 Jahre vor

Gelöst


Create tangent function out of cosine only
Please don't use tangent and sine functions

mehr als 5 Jahre vor

Gelöst


Create tangent function out of sine function only
Please don't use cosine and tangent functions

mehr als 5 Jahre vor

Gelöst


I told you not separate me, but you did :( - ACDC
Given input vector, output it's DC and AC value Example: input = 0 1 -1 0 ac = 0 1 -1 0 dc = 0

mehr als 5 Jahre vor

Gelöst


Encode Me From The Past
Given this input x = 2, 5, 1, 2, 4, 1, 1, 3 output should be (Five 2's, Two 1's, One 4, Three 1's) [2 2 2 2 2 1 1 4 1...

mehr als 5 Jahre vor

Gelöst


Twin Primes
Twin primes are pairs of primes that are immediately next to each other (difference of two). The lesser of twin primes are 3, 5,...

mehr als 5 Jahre vor

Gelöst


Set defaults
Write a function that computes the volume of a cube. The function should be able to accept three inputs: the length, width, and...

mehr als 5 Jahre vor

Gelöst


Distance Between Points
Being n the number of points (If n = 3 there would be 3 points: A, B and C). The distance between each pair of points increases...

mehr als 5 Jahre vor

Gelöst


Find the solution of algebraic equation
Find the solution of algebraic equation of the form an*x^n + a(n-1)*x^(n-1) + (an-2)*x^(n-2)+...... a2*x^2 + a1*x^1 + a0 = 0;...

mehr als 5 Jahre vor

Gelöst


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

mehr als 5 Jahre vor

Gelöst


Back to basics 17 - white space
Covering some basic topics I haven't seen elsewhere on Cody. Remove the trailing white spaces from the input variable

mehr als 5 Jahre vor

Gelöst


Get the value 100
Knowing that 123-45-67+89=100, write a function that gives this result for any order of the digits in the input. Otherwise, the ...

mehr als 5 Jahre vor

Gelöst


Sum of a geometric series
Give the sum of the first 'n' terms of a geometric series, given 'a' as the first term and 'r' as the ratio.

mehr als 5 Jahre vor

Gelöst


Count consecutive 0's in between values of 1
So you have some vector that contains 1's and 0's, and the goal is to return a vector that gives the number of 0's between each ...

mehr als 5 Jahre vor

Gelöst


Oh Zero Zero Zero!!!
Hello all, So you have to find the largest section of zeros in a vector and then find the length of those zeros and there start...

mehr als 5 Jahre vor

Gelöst


Alternating 1´s and 0´s in a matrix
Given an odd number n, write a function that creates a matrix y with dimension nxn alternating 1's and 0's, and starting with 1 ...

mehr als 5 Jahre vor

Gelöst


Say type of roots in quadratic equation
Given the coefficients of a quadratic equation, write a function that gives the output y='RealDifferent' if the roots are real a...

mehr als 5 Jahre vor

Mehr laden