Resuelto


PEMDAS 101
Return the following results for scalar values a,b,c,d.

más de 5 años hace

Resuelto


Cylinder volume
The volume V of a cylinder with radius r and height h is given by . Three cylinders are provided with radius r = [r1, r2, r3] ...

más de 5 años hace

Resuelto


Logarithmically spaced vector creation using linspace
Create a vector y containing n logarithmically spaced values between a and b, with a < b. Avoid using logspace and use the linsp...

más de 5 años hace

Resuelto


Logarithmically spaced vector creation using logspace
Create a vector y containing n logarithmically spaced values between a and b, with a < b. Use the logspace operator.

más de 5 años hace

Resuelto


Vector creation using colon operator
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use the colon (:) operator.

más de 5 años hace

Resuelto


Vector creation using linspace
Create a vector y containing n uniformly spaced values between a and b, with a < b. Use linspace.

más de 5 años hace

Resuelto


Function composition - harder
Write a function that accepts an arbitrary number of function handles f_1, f_2, ..., f_n and returns the composition h. That is,...

más de 5 años hace

Resuelto


Create a patchwork matrix
This function will assemble a large matrix out of a number of smaller ones m1, m2, etc., according to a pattern P. If P is 3x5,...

más de 5 años hace

Resuelto


Polarisation
You have n polarising filters stacked one on top of another, and you know each axis angle. How much light gets passed through th...

más de 5 años hace

Resuelto


Right shift an array n times with constant space.
Right shift an array n times with constant space, that is, no extra array can be used. Right shift operation: Last element com...

más de 5 años hace

Resuelto


Prime Product
My professor has given a sequence of N numbers as a1, a2, ..., aN and asked me to find the smallest possible value of ai * aj su...

más de 5 años hace

Resuelto


Spiral In
Create an m by n matrix filled with sequential integers starting from 1 and arranged in a counterclockwise spiral that hugs the ...

más de 5 años hace

Problema


Compute a sum of Ramanujan
Srinivasa Ramanujan defined the following function: Write a function to compute for various values of . See also Cody Proble...

más de 5 años hace | 3 | 19 solvers

Resuelto


Accumulate Cells
Given a combining function, a cell array, and an initial value, accumulate the result. For example, accumcell(@plus,{1,...

más de 5 años hace

Resuelto


The Birthday Phenomenon
First off, leap years are not being considered for this. In fact the year that people are born shouldn't be taken into considera...

más de 5 años hace

Resuelto


Connect Four - 01
Connect four is a two player board game. <https://en.wikipedia.org/wiki/Connect_Four> Given a complete connect-four board,...

más de 5 años hace

Resuelto


Determine the average number of rounds for the following game.
Each round a uniformly distributed random number is picked between 0 and 1. The game ends when the sum of the random numbers is ...

más de 5 años hace

Resuelto


preventing a war!!
essume you are a student and your family paid a lot of money for your classes but unfortunately the online classes made you a ...

más de 5 años hace

Resuelto


Function - Cylinder Surface Area
The goal

más de 5 años hace

Resuelto


$10,000 sequence
Find the nth term of the Hofstadter–Conway sequence and its chaotic cousin. <https://en.wikipedia.org/wiki/Hofstadter_sequenc...

más de 5 años hace

Resuelto


Molecule Atomic Wt (CHONS) Molecules
Given a molecular equation string determine its atomic weight. Limited atoms of C H O N and S where wts are rounded to [12 1 ...

más de 5 años hace

Problema


Find the smallest integer m such that n divides m!
Write a function that takes an integer and finds the smallest integer whose factorial is divisible by . For example, if , then...

más de 5 años hace | 4 | 19 solvers

Resuelto


Best Problem Elections
When I am writing those words, there are 2002 problems on Cody. Many of them are simply wonderful. Do you remember which of them...

más de 5 años hace

Resuelto


Create nXn Fourier matrix

más de 5 años hace

Resuelto


Find the number of days in a given year
Given a year number (eg. 2000) as input, find how many days are there in the given year.

más de 5 años hace

Resuelto


Creating max function using FOR loops

más de 5 años hace

Resuelto


Aquiles y la tortuga
Contaba Zenón en su famosa paradoja que un día Aquiles, el guerrero griego más veloz de la Hélade, se enfrentó a una pequeña tor...

más de 5 años hace

Resuelto


Return the names and values of the input arguments of a function
Given a function name, return the names and values of the input arguments. e.g. function_name(arg1, arg2) is a function de...

más de 5 años hace

Resuelto


Find offset of an element of a multi dimensional matrix
For a given multi dimensional matrix and given element, find its offset from the 1st element. Return 0, if element is not fo...

más de 5 años hace

Resuelto


Find offset of given matrix element from first matrix element
Given matrix m and an element of that matrix, return the offset from its first element. e.g. m=[11 2 34; 40 51 6; 87 8 109] el...

más de 5 años hace

Cargar más