Gelöst


Number of problems
No, you don't read it wrong: this assignment is to return the number of this problem (and not the problem of this number).

mehr als 11 Jahre vor

Gelöst


Weave two vectors into one
Weave the two given vectors into one as shown below. Example: If a = [1 1 1] b = [0 0 0] then y = [1 0 1 0 ...

mehr als 11 Jahre vor

Gelöst


Square wave average calculation
Given its peak and duty cycle, calculate avg value of square wave

mehr als 11 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 11 Jahre vor

Gelöst


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

mehr als 11 Jahre vor

Gelöst


Remove the middle element from a vector
Remove the middle element of a vector? *Example:* [1,2,3] should return 2 [1,2,3,4] should return 2 [] should return...

mehr als 11 Jahre vor

Gelöst


Diagonal & Anti-Diagonal Matrix: Easy
Create a matrix as shown below from "magic" square. For example: if input x=9;then use mgic(x) and create the matrix...

mehr als 11 Jahre vor

Gelöst


Calculate the peak value of square wave
Given the peak value of sine wave, calculate corresponding peak value of square wave, if both have same RMS voltage.

mehr als 11 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 11 Jahre vor

Gelöst


Find the square of the sum of the digits of a number
If a number (n) is provided as an input, find the square of the sum of the digits of the number. Example If n = 21, the an...

mehr als 11 Jahre vor

Gelöst


Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

mehr als 11 Jahre vor

Gelöst


Perl 2: pop
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

mehr als 11 Jahre vor

Gelöst


Perl 3: shift
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

mehr als 11 Jahre vor

Gelöst


Perl 4: unshift
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

mehr als 11 Jahre vor

Gelöst


Uniform binary crossover
Given two binary vectors, return the two children by combining the genes of them using a binary crossover mask. More informat...

mehr als 11 Jahre vor

Gelöst


Perl 1: push
_This is part of a series of perl function which were very helpful for many perl programmers. Could you implement it in Matlab?_...

mehr als 11 Jahre vor

Gelöst


Sunday bonus
Submit a solution on any Sunday and you will get 10 points. Only for MATLAB fans!

mehr als 11 Jahre vor

Gelöst


Adding Cells with numbers defined as strings
Given a cell, with strings representing numbers, add each value. For example: a = {'9','33'}; the output should be: ...

mehr als 11 Jahre vor

Gelöst


Infernal Recursion
Consider the recursion relation: x_n = (x_(n-1)*x_(n-2))^k Given x_1, x_2, and k, x_n can be found by this definition. Wr...

mehr als 11 Jahre vor

Gelöst


Calculate the Hamming distance between two strings
Inspired by a similar Cody problem found <http://www.mathworks.com/matlabcentral/cody/problems/93-calculate-the-levenshtein-dist...

mehr als 11 Jahre vor

Gelöst


Is the paranthesis sequence balanced ?
Quantum mechanics and computer science are interested in <http://en.wikipedia.org/wiki/Bra%E2%80%93ket_notation bra-kets>. Today...

mehr als 11 Jahre vor

Gelöst


Elapsed time is -0.005204 seconds.
Write a function that takes less than zero seconds to execute, as measured using tic and toc. For repeatability, the test case p...

mehr als 11 Jahre vor

Gelöst


Volume difference between Ellipsoid and Sphere
Given an ellipsoid of semi principal axis (a,b,c) find the volume of the difference between this ellipsoid and the sphere with...

mehr als 11 Jahre vor

Gelöst


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

mehr als 11 Jahre vor

Gelöst


Box!
Given a box, find the volume of the cube. With each side = a.

mehr als 11 Jahre vor

Gelöst


Cody Computer Part 4 : Are you a morning Cody player Addicted ?
This is a stupid Cody challenge. You just have to *click "Submit" between 7 and 9 AM.* ... Greenwich Mean Time (GMT). To see ...

mehr als 11 Jahre vor

Gelöst


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

mehr als 11 Jahre vor

Gelöst


Steal, Share, or Catch
You, I, and a few other characters are going to play a game of *Steal, Share or Catch*. We are going to play it 10,000 times vs...

mehr als 11 Jahre vor

Gelöst


Pluralization
Define function plu(n) that returns '' (an empty string) if n=1, or 's' otherwise. This is handy for displaying messages from a...

mehr als 11 Jahre vor

Gelöst


Assign matrix rows/columns to separate variables
This is a slight variant of <http://www.mathworks.com/matlabcentral/cody/problems/2668-assign-matrix-elements-to-separate-variab...

mehr als 11 Jahre vor

Mehr laden