Resuelto


Elapsed time is -0.005204 seconds.
Write a function that takes less than zero seconds to execute, as measured using tic and toc. For repeatability, the test case p...

más de 4 años hace

Resuelto


We love vectorized solutions. Problem 1 : remove the row average.
Given a 2-d matrix, remove the row average from each row. Your solution MUST be vectorized. The solution will be tested for ac...

más de 4 años hace

Resuelto


German tank problem
The <http://en.wikipedia.org/wiki/German_tank_problem German tank problem> is a well-known statistical problem that attempts to ...

más de 4 años hace

Resuelto


Does the coin touch the line?
If we throw a coin that has a diameter of d, its center will land in a grid n x m. What is the probability that the coin land...

más de 4 años hace

Resuelto


Number generator
In this problem, a number will be given. starting with the first digit, keep on adding all subsequent digits till the state (...

más de 4 años hace

Resuelto


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

más de 4 años hace

Resuelto


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

más de 4 años hace

Resuelto


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

más de 4 años hace

Resuelto


Upper triangular matrix
Create a function to retrieve the upper triangular matrix of a matrix (without using tril). The matrix will always be square. ...

más de 4 años hace

Resuelto


grazing cows
Here is a fun problem I encountered in high school. Two cows are grazing in an enclosed square-shaped field of side length s ...

más de 4 años hace

Resuelto


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

más de 4 años hace

Resuelto


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

más de 4 años 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...

más de 4 años hace

Resuelto


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

más de 4 años hace

Resuelto


Zero
given an integer a, find the smallest possible integer b(b>0) such that their bitwise logical AND is zero. * if a=11(1011) t...

más de 4 años hace

Resuelto


Restricted Addition
Add two numbers without use of common arithmetic operations. Unfortunately, in order to enforce this restriction, other restrict...

más de 4 años hace

Resuelto


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

más de 4 años hace

Resuelto


Calculating large fibonacci numbers
The fibonacci sequence starts 1,1,2,3,5,8... Find the the n'th fibonacci number. Then calculate round(log10( . )) of that n't...

más de 4 años hace

Enviada


Cosmological N-Body Initial Condition Maker
Given a power spectrum, generate the 3D coordinates for a lattice of perturbed particles and their velocities.

más de 4 años hace | 1 descarga |

Thumbnail

Enviada


A Few Root-Finding Algorithms
This contains four different root-finding algorithms, each having a niche region of utility.

más de 4 años hace | 2 descargas |

Thumbnail

Resuelto


Find the nearest prime number
Happy 5th birthday, Cody! Since 5 is a prime number, let's have some fun looking for other prime numbers. Given a positive in...

más de 4 años hace

Resuelto


Extra safe primes
Did you know that the number 5 is the first safe prime? A safe prime is a prime number that can be expressed as 2p+1, where p is...

más de 4 años hace

Resuelto


Angle between two vectors
You have two vectors , determine the angle between these two vectors For example: u = [0 0 1]; v = [1 0 0]; The a...

más de 4 años hace

Resuelto


Project Euler: Problem 3, Largest prime factor
The prime factors of 13195 are 5, 7, 13 and 29. What is the largest prime factor of the number being input, input might be ui...

más de 4 años hace

Resuelto


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

más de 4 años hace

Resuelto


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

más de 4 años hace

Resuelto


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

más de 4 años hace

Resuelto


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

más de 4 años hace

Resuelto


The sum of the numbers in the vector
eg. [1,2,3]---->SUM=6

más de 4 años hace

Resuelto


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

más de 4 años hace

Cargar más