Solved


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

11 years ago

Solved


Create a function handle that reverses the input arguments of another function handle
Given a function that takes two input arguments and returns one output, create another function handle that performs the same op...

11 years ago

Solved


Solve the set of simultaneous linear equations
Given this pair of simultaneous linear equations: 2x + 3y = 23 3x + 4y = 32 Find the solution set (x,y)

11 years ago

Solved


Volume and area of a sphere
Input(r) - radius Output([v,s]) - volume and area

11 years ago

Solved


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

11 years ago

Solved


06 - Matrix Equations 2
Define the vectors _aVec_ and _bVec_: <<http://samle.dk/STTBDP/Assignment1_2a.png>> and <<http://samle.dk/STTBDP/Assig...

11 years ago

Solved


Given area find sides
In a right angle triangle given area 'A' one arm=x, another arm=2x then find the value of x. For example, area A=400 then ...

11 years ago

Solved


Back to basics 24 - Symbolic variables
Covering some basic topics I haven't seen elsewhere on Cody. Given a string algebraic expression, return the symbolic variabl...

11 years ago

Solved


Gauss Eliminate 2-by-2 example
Use forward elimination to make the coefficient matrix, A, an upper triangular matrix, and then solve using back substitution, f...

11 years ago

Solved


Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...

11 years ago

Solved


select the primes of a vector
Find the prime numbers in a vector

11 years ago

Solved


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

11 years ago

Solved


Transpose
Write a MATLAB script in order to convert a random length row vector (v) into a column vector.

11 years ago

Solved


Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

11 years ago

Solved


Make an N-dimensional Multiplication Table
*INSTRUCTIONS* This is a multi-dimensional variant of the normal multiplication table used to teach elementary students multi...

11 years ago

Solved


Tricky timing
Write a function that takes between 0.5 seconds and 0.6 seconds to run.

11 years ago

Solved


Complex number
For complex number c=a+bi, write code that will add a and b together.

11 years ago

Solved


What percentage?
Calculate the output c as the percentage of a on b for given a and b.

11 years ago

Solved


Circumscribed circles
Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

11 years ago

Solved


find the maximum element of the matrix
for e.g x = [1 2; 3 4] y = 4

11 years ago

Solved


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

11 years ago

Problem


Test Driven Solution - Probability Problem 3
*Problem:* Without any Cody cheats, write code that passes the test suite. *Hint:* The test suite gets samples from the proba...

11 years ago | 2 | 12 solvers

Problem


Test Driven Solution - Probability Problem 2
*Problem:* Without any Cody cheats, write code that passes the test suite. *Hint:* The test suite gets samples from the proba...

11 years ago | 1 | 15 solvers

Solved


07 - Common functions and indexing 1
Define _cMat_: <<http://samle.dk/STTBDP/Assignment1_3c.png>> ( _cMat_ = 10x10 matrix where the numbers from 1 to 100 runs ...

11 years ago

Solved


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

11 years ago

Solved


Make an awesome ramp for a tiny motorcycle stuntman
Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

11 years ago

Solved


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

11 years ago

Solved


Hackathon: the beginnings
I am thinking of a number between 1 and 10000... can you guess what this number is? *Description* The test suite has rando...

11 years ago

Problem


Test Driven Solution - Probability Problem 1
*Problem:* Without any Cody cheats, write code that passes the test suite. *Hint:* The test suite gets samples from the proba...

11 years ago | 1 | 18 solvers

Solved


MATCH THE STRINGS (2 CHAR) very easy
Match the given string based on first two characters on each string. For example A='harsa'; b='harish'; result '1' ...

11 years ago

Load more