Solved

Create a constant offset.

Add a constant offset to an array. Example a = [1 3 5 9] offset = 2 y = [3 5 7 11]

6 Monate ago

Solved

subtract central cross

Given an n-by-n square matrix, where n is an odd number, return the matrix without the central row and the central column.

6 Monate ago

Solved

Cos Function

x is the abscissa. find the absolute value of cosine of -x and the same value with changed sign.

6 Monate ago

Solved

Area of polygon

Given the vertices in vectors X,Y, return the area of the polygon they define.

6 Monate ago

Solved

Simple polynomial evaluation

Compute the value of a polynomial of degree n with all coefficients '1', at value x. n is always n>=0. p(x)=1+x+x^2+...+x^n...

6 Monate ago

Solved

Polynomial evaluation

Compute the value of a polynomial of degree n with coeffcients in vector a, at value x. p(x)=a(1)+a(2)x+a(3)x^2+...+a(n+1)x...

6 Monate ago

Solved

Alternate elements!

Write a function that combines two lists by alternating the elements, e.g. ['a','b','c'], ['1','2','3'] → 'a1b2c3'.

7 Monate ago

Solved

Duplicate each element of a vector.

for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

7 Monate ago

Solved

Draw a x-by-x matrix 'Denmark flag'(Euro(2020)

Draw a x-by-x matrix 'Denmark flag' using '4' and '1'.(x is odd and bigger than 4) Number 4: Caption S.Kjær and number 1: K.S...

7 Monate ago

Solved

Draw matrix 'Swiss flag'( Euro 2020)

Draw a x-by-x matrix 'Swiss flag' using '0' and '1'.(x is odd and bigger than 4) Example x=5 ...

7 Monate ago

Solved

convert between ascii and characters

I have seen multiple problems like this but none of them have a robust test suite associated with them. The first input C is ...

7 Monate ago

Solved

Add consecutive integer numbers

Given consecutive numbers, add the numbers *without using the sum command in MATLAB.*

7 Monate ago

Solved

How long does it take to run a bath?

Given the *volume flow rate* (volume/time) of a faucet and the *volume* of a bath tub, find the amount of time it takes to fill ...

7 Monate ago

Solved

Area of a pentagon

Given the side of a regular pentagon and its apothem return the area of pentagon. Remember the area of pentagon is calculate ...

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

7 Monate ago

Solved

Binary Inversion

Given the unsigned 8-bit integer x, return the number y which is the binary inversion of x. For example if x is 5, y should b...

7 Monate ago

Solved

Count the numbers

In a array x, count the number of times the number n appears in x. for example: x = [1 2 3 4 3 2 1 2] and n = 2 the answer sh...

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

7 Monate ago

Solved

sum of ASCII

Given a string x, return the sum of all ASCII numbers of all characters. for example, if x='lala' ('l'-> 108, 'a'->97) then y...

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

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

7 Monate ago

Solved

Odd times even numbers in a matrix

First count the number of odd numbers in x, then the number of even. Return their product. example: x = [1 2] One odd ...

7 Monate ago

Solved

Finding sum of even numbers in a vector.

Find the sum of all the even numbers present in the input vector x. Examples: Input x = [1 2 3 4] Output y is 6 Input...

8 Monate ago

Solved

Project Euler: Problem 1, Multiples of 3 and 5

If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23...

8 Monate ago

Solved

Percentage profit:2

If you are selling at x dollar, you are facing r1% profit; what will be the selling price for making r2% profit?

8 Monate ago

Solved

Percentage profit

If you are buying at x dollar, what will be the selling price for making the r% profit?

8 Monate ago

Solved

Probability of red tulips

I hope to give you bulbs of tulip. But I do not know the color of those petals. I just know that the color is red, white or yell...

8 Monate ago