문제를 풀었습니다


Integer to boolean
Write a general function that will create the following conversation; Input is a column vector with integers Output is a b...

24일 전

문제를 풀었습니다


Five Fingers
A little girl has just learnt how to count from 1 to N using the five fingers of her left hand as follows. She starts by calling...

24일 전

문제를 풀었습니다


"Identify and Replace Outliers in a Numeric Array"
Given a numeric array, identify outliers that are more than two standard deviations away from the mean and replace them with the...

24일 전

문제를 풀었습니다


Simple date to serial no. conversion
Convert a date string to a serial date number. For example if you take x='19-May-2001' then the result is 730990 x...

24일 전

문제를 풀었습니다


Detect a number and replace with two NaN's
Write code which replaces the number 1 with two NaNs. Example X = [ 1 2 NaN 4 1 3 7 NaN 1 4 NaN 2] ...

24일 전

문제를 풀었습니다


Dealfun (1.0)
*Short description.* Write a function _dealfun_: [y1,y2,...,yn]=dealfun(fhandle,x1,x2,...,xn) which evaluates the f...

24일 전

문제를 풀었습니다


Negation and new variables
Inspired by Problem 1827 by Andrew Newell. Write a function that has the following property: (x~=y) neg3(x)=x; neg3...

24일 전

문제를 풀었습니다


Assign matrix elements to separate variables
Given an input array, return each element of the array as a separate variable. If the number of output arguments (k) is less tha...

24일 전

문제를 풀었습니다


Play Hocus Focus
The card game Hocus Focus starts by placing twelve cards with wizards face up on a table. The characteristics of the wizards tha...

24일 전

문제를 풀었습니다


Probabilities - Balls and urns - 01
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

24일 전

문제를 풀었습니다


How many complete pizzas (number 2)
x is a vector with numbers of pizza slices. A corresponding vector n indicates in how many slices the pizza slices of x were cut...

24일 전

문제를 풀었습니다


Dial Up
Each number on telephone keypads, except 0 and 1, corresponds to a set of uppercase letters as shown in this list: 2 ABC, 3 DEF...

24일 전

문제를 풀었습니다


Roman numbers: how old is that building?
The front of old buildings sometimes show the year when they were built in roman numbers. These number are rather confusing and ...

24일 전

문제를 풀었습니다


Create an empty array
Suppose you need an empty array. e = [] will give you one, but it's a double array, which may not help if you need a differen...

24일 전

문제를 풀었습니다


Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...

24일 전

문제를 풀었습니다


Find all repeated numbers
For a given vector, find all numbers that repeated 2 times or more than 2 times. Example: A=[1 2 3 3 4 5 6 6 7] y=[3 ...

24일 전

문제를 풀었습니다


How to calculate the length of a triangle's side given two angles and one side
You are given a triangle with angles alpha, beta and gamma and sides a opposite alpha, b opposite beta and c opposite gamma. ...

24일 전

문제를 풀었습니다


Replace all zeros and NaNs in a matrix with the string 'error'
Given a numeric input matrix A, possibly containing some zero values and some NaNs, replace any occurrences of zero or NaN with ...

24일 전

문제를 풀었습니다


Leonardo primes
Leonardo numbers are defined by following recurrence relation: Leonard prime is Leonardo number which is also prime (see ...

24일 전

문제를 풀었습니다


Power of n ?
Determine if x (positive integer) is a power of n, return true or false accordingly.

24일 전

문제를 풀었습니다


Prime number check (★★)
One way to see if a number x is prime is to compute the remainders obtained when dividing x by all integers from 2 to √(x). If x...

24일 전

문제를 풀었습니다


pizza deals
Given two pizza slices of different sizes: * Slice A with angle alpha1, radius r1, and price p1 * Slice B with angle alpha2,...

24일 전

문제를 풀었습니다


Sum Rows
Sum the same indexed (unique) rows. Examine the test suite. Related Challenge - <http://www.mathworks.com/matlabcentral/cody/...

24일 전

문제를 풀었습니다


Cannibal eating odd and even numbered men
There are N men in a queue. A cannibal eats either all odd-numbered or all even-numbered men in the queue at a time. In the fi...

24일 전

문제를 풀었습니다


Divide polynomial p1 by p2.
Divide polynomial p1 by p2 given as vectors. Return result q and r vectors which corresponds the quotient and remainder of divis...

24일 전

문제를 풀었습니다


Half?
If you toss an even number (x) of coins, what is the probability (y) of 50% head and 50% tail?

24일 전

문제를 풀었습니다


06 - Matrix Equations 3
Define the matrices _aMat_, _bMat_, and _cMat_: <<http://samle.dk/STTBDP/Assignment1_3a.png>> ( _aMat_ = 9x9 matrix full o...

24일 전

문제를 풀었습니다


Horizontal matrix sort
Given a matrix x with n rows and m columns, return a matrix y with n rows and 2m columns, such that every row in x is sorted fro...

24일 전

문제를 풀었습니다


Find prime number couples
Given a vector a, which will always contain at least one pair of prime numbers couple, return a matrix called 'couple' in which ...

24일 전

더 보기