Solved


Remove multiples of N
in the vector x remove all multiples of N. x = [1 2 3 4 5 6]; N = 2; Then y = [1 3 5];

1 month ago

Solved


Let's see how peculiar we can get
The task is to multiply two numbers. But do it in the most peculiar possible way.

1 month ago

Solved


Odd times 3
Given a input matrix x, multiply all odd values by 3. Even values remain the same. example: x = [1 2 3 4 5;... 6 7...

1 month ago

Solved


Find minimum and maximum elements of an array
For a given array find minimum and maximum elements of an array and store minimum value in first index of output and maximum in ...

1 month ago

Solved


All odd - all even
All odd numbers in x are added, while all even numers are subtracted from this. example: x = [1 2 3 4 5]; y = +(1+3+5)-...

1 month ago

Solved


Largest Prime Number
Given a matrix X, find the largest prime number in X.

1 month ago

Solved


Second smallest number
What is the second smallest number in x? example: x = [1 2 3 4 5 6 7 8 9] y = 2

1 month ago

Solved


i forgot to use capital I
When referring to yourself you should write "I" (capital) and not "i". So correct the input string x, but be aware that other u...

1 month ago

Solved


Check capital letters
Check if each first letter of a string is a capital letter. for example: 'This Is Ok' gives a true answer and 'This Is not Ok' ...

1 month ago

Solved


time difference
The arrays x and y contain time values in the form of: x = [hours minutes seconds] Create the output z which contains the...

1 month ago

Solved


How many complete pizzas
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...

1 month ago

Solved


Replace 0 to NaN!
In given matrix A=[1 nan nan; 2 2 nan; nan nan 1]; replace NaN to 0. Use matrix A as a input.

1 month ago

Solved


Add the positive numbers
Add only the positive numbers of x example: x = [-2 -1 0 1 2 3] the positive numbers are: 1 2 3, so their sum is 6

1 month ago

Solved


If you have matrix A, create matrix B using matrix A as an "element"
A = [1 2 3 4; 5 6 7 8] B = [1 2 3 4 1 2 3 4; 5 6 ...

1 month ago

Solved


Add the even numbers
Add only the even numbers of x example: x = [1 2 3 4 5] the positive numbers are: 2 4, so their sum is 6

1 month ago

Solved


Add the odd numbers
Add only the odd numbers of x example: x = [1 2 3 4 5] the positive numbers are: 1 3 5, so their sum is 9

1 month ago

Solved


Equal temperament - musical notes and frequency
Starting from 440Hz note (musical note A above middle C), create 13 notes, using twelve-tone equal temperament, in Herz units. ...

1 month ago

Solved


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

1 month ago

Solved


does it touch ?
given a sentence, tell how much it touches. input : string output : how much it touches touching : a bilabial phoneme d...

1 month ago

Solved


the fly, the train, the second train, and their Zeno's paradox
*You have heard this one*: A train leaves station _A_ and travels with constant velocity _v1_. A second train leaves station _B_...

1 month ago

Solved


ICFP2024 001: Lambdaman 6
The ICFP2024 contest was held June29 thru July 1. The contest consisted of five parts: ICFP Language, Lambdaman maze, Starship f...

1 month ago

Solved


Radiation Heat Transfer — View Factors (1)
View factors (aka configuration factors) are utilized in some radiation heat transfer models to estimate heat transfer rates bet...

1 month ago

Solved


Calculate the Distance to Source of Lightning
Lightning discharge heats air rapidly with lightning channels reaching temperatures of up to 50,000 degrees Fahrenheit (which is...

1 month ago

Solved


Find the first occurence of a given gap between two consecutive prime numbers
Problem statement Given a gap = p' - p between the two consecutive prime numbers p and p', find its first occurence, f. E...

1 month ago

Solved


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

1 month ago

Solved


give nth decimal place of pi
max 15th place after the decimal point is ok for now

1 month ago

Solved


Polygonal numbers
The task of <http://www.mathworks.co.uk/matlabcentral/cody/problems/5 Problem 5> is to calculate triangular numbers. By playing ...

1 month ago

Solved


Digital Neighbourhood
Given a natural number reorder its digits to create another number, closest to the given one. Examples: * 123 gives 132, ...

1 month ago

Solved


How unique?
Sometimes, when we check unique entries of vector we would like to know how many times each value occurs. Given vector of num...

1 month ago

Solved


Compute the largest number whose prime factors sum to n
This problem deals with a sequence whose tenth term is 36 because the prime factors of 36 (2, 2, 3, 3) sum to 10. The number 32 ...

1 month ago

Load more