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

Gelöst


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

fast 11 Jahre vor

Gelöst


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)

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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.

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

fast 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 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%

etwa 11 Jahre vor

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

etwa 11 Jahre vor | 2 | 12 Lösungsvorschläge

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

etwa 11 Jahre vor | 1 | 15 Lösungsvorschläge

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

Gelöst


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

etwa 11 Jahre vor

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

etwa 11 Jahre vor | 1 | 18 Lösungsvorschläge

Gelöst


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

etwa 11 Jahre vor

Mehr laden