Gelöst


Make combination of two given matrices.
Make a combination of the two given matrices as a given example. Example: input1 = [1 2 3; 4 5 6]; input2 = [7 8; 9 10...

fast 13 Jahre vor

Gelöst


Find the "ordinary" or Euclidean distance between A and Z
A, B and Z define three points in the 3D _Euclidean_ space of the form: A = [x1;y1;0]; B = [x2;y2;0]; Z = [x2;y2;z]; Find th...

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

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

fast 13 Jahre vor

Gelöst


Which doors are open?
There are n doors in an alley. Initially they are all shut. You have been tasked to go down the alley n times, and open/shut the...

fast 13 Jahre vor

Gelöst


Back to basics 20 - singleton dimensions
Covering some basic topics I haven't seen elsewhere on Cody. Remove the singleton dimensions from the input variable (e.g. if...

fast 13 Jahre vor

Gelöst


Generate binary combinations for a given number of bit(s)
Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

fast 13 Jahre vor

Gelöst


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

fast 13 Jahre vor

Gelöst


Mode
Find the mode of the vector Assumption: no vector is bimodal Example 1: input=[1 2 3 4 4]; output=4 Example 2: input=[7...

fast 13 Jahre vor

Gelöst


Method of Common Differences part-1
Use the method of common differences to output a vector containing the initial values and the nth order difference. ex ...

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

fast 13 Jahre vor

Gelöst


Champernowne Constant
The <http://en.wikipedia.org/wiki/Champernowne_constant Champernowne constant> is a real number whose digits in decimal represen...

fast 13 Jahre vor

Gelöst


Pascal's Matrix
Given an integer n &ge; 0, generate the ( _n_+1) &times; ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

fast 13 Jahre vor

Gelöst


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

fast 13 Jahre vor

Gelöst


peta to nano (x-ray)
for certain x-ray radiation, given frequency in petahertz, give wavelength in nanometer, must be accurate +/- 25%

fast 13 Jahre vor

Gelöst


Distance walked 3D
suppose you go from x-y-z coordinates [3,4,2] to [0,0,2] to [0,1,2] to [1,1,2], to [1,1,20] then you walked 25 units of distance...

fast 13 Jahre vor

Gelöst


Prime Time
All you need to do here is submit your solution a prime number of seconds after the top of the hour. Any hour at all... Easy, ...

fast 13 Jahre vor

Gelöst


Calculate Engine Power
Calculate Engine Power (P) in kW given the values of Torque(M) in Nm and Engine Speed(n) in rpm

fast 13 Jahre vor

Gelöst


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

fast 13 Jahre vor

Gelöst


Find the two most distant points
Given a collection of points, return the indices of the rows that contain the two points most distant from one another. The inpu...

fast 13 Jahre vor

Gelöst


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

fast 13 Jahre vor

Gelöst


Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length). For example: x = [1 2 3 3 2 1] ...

fast 13 Jahre vor

Gelöst


Number of vertices of a hypercube
Return the number of vertices of a n-dimensional hypercube.

fast 13 Jahre vor

Gelöst


Stuff the Board
You have a stack of tiles to put onto an array-like playing board. Each tile has a number (always an integer), and the board var...

fast 13 Jahre vor

Gelöst


Prime factor digits
Consider the following number system. Calculate the prime factorization for each number n, then represent the prime factors in a...

fast 13 Jahre vor

Gelöst


Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

fast 13 Jahre vor

Gelöst


Find the palindrome
Given the string a, find the longest palindromic sub-string b. So when a = 'xkayakyy'; you should return b = 'kayak';

fast 13 Jahre vor

Gelöst


So many choices
For inputs _n_ and _k_ (in that order), output the number of ways that k objects can be chosen from amongst n distinct objects. ...

fast 13 Jahre vor

Mehr laden