Resuelto


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

27 días hace

Resuelto


Find the sides of an isosceles triangle when given its area and height from its base to apex
Find the sides of an isosceles triangle when given its area and the height from its base to apex. For example, with A=12 and h=...

27 días hace

Resuelto


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

27 días hace

Resuelto


Back to basics 6 - Column Vector
Covering some basic topics I haven't seen elsewhere on Cody. Given an input vector, output true or false whether it is a colu...

27 días hace

Resuelto


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If p is the perimeter of a right angle triangle with integral length sides, { a, b, c }, there are exactly three solutions for p...

27 días hace

Resuelto


Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

27 días hace

Resuelto


Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vertices of ...

27 días hace

Resuelto


Max of a Vector
Write a function to return the max of a vector

27 días hace

Resuelto


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

27 días hace

Resuelto


Pi Estimate 1
Estimate Pi as described in the following link: <http://www.people.virginia.edu/~teh1m/cody/Pi_estimation1.pdf>

27 días hace

Resuelto


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

27 días hace

Resuelto


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

27 días hace

Resuelto


Find the max element of the array
Find the max element of the array

27 días hace

Resuelto


Square root
Given x (a matrix), give back another matrix, where all the elements are the square roots of x's elements.

27 días hace

Resuelto


Calculate the average value of the elements in the array
Calculate the average value of the elements in the array

27 días hace

Resuelto


to the 2 all elements
to the 2 all elements

27 días hace

Resuelto


the average value of the elements
Calculate the average value of the elements in the array

27 días hace

Resuelto


Double all elements in the array
Duplicate all elements in the array

27 días hace

Resuelto


calculate the length of matrix
input 1 array, calculate the length

27 días hace

Resuelto


Draw a '0' in a one matrix!

27 días hace

Resuelto


Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

28 días hace

Resuelto


(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

28 días hace

Resuelto


Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

28 días hace

Resuelto


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

28 días hace

Resuelto


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

28 días hace

Resuelto


Check that number is whole number
Check that number is whole number Say x=15, then answer is 1. x=15.2 , then answer is 0. http://en.wikipedia.org/wiki/Whole_numb...

28 días hace

Resuelto


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

28 días hace

Resuelto


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Input...

28 días hace

Resuelto


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

28 días hace

Resuelto


Create a vector
Create a vector from 0 to n by intervals of 2.

28 días hace

Cargar más