解決済み


unique with nan
input x = [2 NaN 3 5 NaN; 1 NaN 4 9 NaN; 8 -2 7 6 -2; 7 4 8 5 4]; output y_correct = [2 ...

6ヶ月 前

解決済み


Distance a ball travels after throwing vertically
Calculate the total distance *'d'* (in meters) a ball would travel after *'s'* seconds and starting velocity of *'v'* (in m/s). ...

6ヶ月 前

解決済み


Optimum Egyptian Fractions
Following problem was inspired by <http://www.mathworks.com/matlabcentral/cody/problems/2126-split-bread-like-the-pharaohs-egypt...

6ヶ月 前

解決済み


Index one element in each vector of an array along a given dimension
Functions like min and max can return in their second output argument the index of the element in each vector along a particular...

6ヶ月 前

解決済み


Bouncing disk
A disk is placed in a rectangular room with dimensions a and b in a point with coordinates x0 and y0. The disk is given a startu...

6ヶ月 前

解決済み


Seemingly impossible problem
This is a _seemingly_ 'impossible' problem, because variously your function, "impossibleFn", must return an output of either 1 o...

6ヶ月 前

解決済み


Identify points inside a Reuleaux triangle
Write a function to identify points that lie in or on a Realeaux triangle, which is a curve of constant width. The input to the ...

6ヶ月 前

解決済み


1D DCT-II transform.
Implement a function that calculates 1D Discrete Cosine Transform <http://en.wikipedia.org/wiki/Discrete_cosine_transform#DCT-II...

6ヶ月 前

解決済み


Triangular matrices in 3D array
Given a 3D numeric array _x_, return an array _y_ of the same size in which all entries to the right of the main diagonal are ze...

6ヶ月 前

解決済み


Compute the dilation of a binary image
A basic operation in image analysis is the dilation. Given an image where each pixel is either on or off (black/white, true/fals...

6ヶ月 前

解決済み


String permutations on phone keyboard
Given a number such as 2639 return all possible string permutations using the phone-keyboard on Problem 1069. input = 78 outpu...

6ヶ月 前

解決済み


combine cells
A cell type variable is created. However it has other cells in itself. we want to integrate them all in a single cell. the conte...

6ヶ月 前

解決済み


Number of bytes required to store a sparse matrix
The input will be a sparse matrix : x = sparse(100,1000,0.01); >>whos x shows that 8024 bytes ares required . The aim...

6ヶ月 前

解決済み


Book Club
A book club that has _K_ members, as a group, have to read _N_ books. Return how many different ways the members could read the ...

6ヶ月 前

解決済み


Magic - Faro Shuffle
The Faro shuffle is the perfect interweaving of cards. Quiz: How many Faro's returns a standard 52 deck to its start? Fifty fo...

6ヶ月 前

解決済み


Compute hamming distance between two binary vectors represented using lists of 1-byte numbers
Let v and u be vectors of the same size with 8-bit integers (0-255). We want to compute the number of bits where those vectors d...

6ヶ月 前

解決済み


Script file size
Determine the file size of a script, "function.m". This is the base scoring method for Cody and the Matlab Contests. A method ...

6ヶ月 前

解決済み


Reassign cell contents to empty variables, preserving cell content data type
Given a cell array C, return a cell array D with the following specifications: 1. D has the same size as the input C. 2. E...

6ヶ月 前

解決済み


What is the current time in Darwin, Australia?
Traders need to track exchange calendars and trading hours in detail, and account for time zone differences and daylight savings...

6ヶ月 前

解決済み


Easy Sequences 93: Recursive Polynomial Function
For a natural number and a polynomial function , we define a recursive function , as follows: , and ...

6ヶ月 前

解決済み


Return the 'Size' of a String of Code
One of the most 'mysterious' parts of playing Cody is the sizing system. Given a string of commands, return the size that Cody w...

6ヶ月 前

解決済み


Tune your guitar
Given an input string with the scientific pitch notation for standard tuning ( <http://en.wikipedia.org/wiki/Guitar_tunings#Stan...

6ヶ月 前

解決済み


Return the Square of a Number
Write a function that takes a single numeric input x and returns its square. That is, given x, your function should output x^2....

6ヶ月 前

解決済み


Slicing the area of a circle
Given the area, A, of a square, consider a circle having the area, πA, and the radius, r. For a given slicing number n>1, find ...

6ヶ月 前

解決済み


Express base-10 integers in lazy binary
The binary (or base-2) representations of a number n can be constructed as follows: Step 1: If n = 0, then the binary represent...

6ヶ月 前

解決済み


Slicing the area of a regular polygon
Given the area, A, of a regular polygon with n sides, each of length s, consider its decomposition in congruent isosceles triang...

6ヶ月 前

解決済み


Calculate Reynolds Number
Write a MATLAB function that calculates the Reynolds number for flow over a flat plate: ​ ρ = fluid density (kg/m³) V = veloc...

6ヶ月 前

解決済み


Compute Airspeed from Mach Number
Write a MATLAB function that converts a Mach number to airspeed given the speed of sound aa in m/s: V=M⋅a V = airspeed (m/s) M...

6ヶ月 前

解決済み


Calculate Drag Force
Write a MATLAB function to compute the drag force on an object moving through air: ​ where: D is drag force (N) ρ is air de...

6ヶ月 前

解決済み


Calculate Lift Force on an Airfoil
Write a MATLAB function to calculate the lift force acting on an airfoil given the air density, wing area, velocity of the airfl...

6ヶ月 前

さらに読み込む