解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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.

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

解決済み


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

11年以上 前

さらに読み込む