Question


More efficient way of this code?
Lets say that i have a function : y=fun(x,z) that do the following calculations : ex1: fun([0 45 90],2) , y=[0 45 90 0 4...

nästan 10 år ago | 2 answers | 0

2

answers

Solved


Speed of light:Experiment
in 1849, Fizeau set up an experiment to measure the speed of light. The discription of this experiment can be found on wikipedi...

ungefär 10 år ago

Solved


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

ungefär 10 år ago

Solved


Right and wrong
Given a vector of lengths [a b c], determines whether a triangle with those sides lengths is a right triangle: <http://en.wikipe...

ungefär 10 år ago

Solved


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

ungefär 10 år ago

Solved


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

ungefär 10 år ago

Solved


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

ungefär 10 år ago

Solved


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

ungefär 10 år ago

Solved


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

ungefär 10 år ago

Problem


Compare two input matrices
Check which input matrix has more elements. Return "1" if matrix A has more elements than matrix B. Otherwise return "0". Exa...

ungefär 10 år ago | 1 | 343 solvers

Problem


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

ungefär 10 år ago | 8 | 329 solvers

Solved


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

ungefär 10 år ago

Solved


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

ungefär 10 år ago

Solved


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

ungefär 10 år ago

Solved


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

ungefär 10 år ago

Solved


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

ungefär 10 år ago

Solved


Is this triangle right-angled?
Given any three positive numbers a, b, c, return true if the triangle with sides a, b and c is right-angled. Otherwise, return f...

ungefär 10 år ago

Solved


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

ungefär 10 år ago

Solved


Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<http://upload...

ungefär 10 år ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

ungefär 10 år ago

Solved


Number of toolboxes?
Return a number equal to the number of toolboxes available to the Cody solvers.

ungefär 10 år ago

Solved


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

ungefär 10 år ago

Solved


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

ungefär 10 år ago

Solved


Return a list sorted by number of occurrences
Given a vector x, return a vector y of the unique values in x sorted by the number of occurrences in x. Ties are resolved by a ...

ungefär 10 år ago

Solved


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

ungefär 10 år ago

Solved


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

ungefär 10 år ago

Solved


Avalaible area: wall construction
You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

ungefär 10 år ago

Problem


Avalaible area: wall construction
You need to build a wall to enclose a certain area. Calculate the available area after you build the wall. Assumptions * ...

ungefär 10 år ago | 2 | 64 solvers

Solved


Back to basics 12 - Input Arguments
Covering some basic topics I haven't seen elsewhere on Cody. Return a value equal to the number of input arguments to the fun...

ungefär 10 år ago

Solved


Free passes for everyone!
_Simply return the name of the coolest numerical computation software ever_ *Extra reward* (get a _freepass_): As an addit...

ungefär 10 år ago

Load more