解決済み


Display negative numbers
Given array,x, display all the negative numbers and display output as y. Example x=[1 -2 3 -4] , output is y=[-2 -4].

9ヶ月 前

解決済み


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

9ヶ月 前

解決済み


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.

9ヶ月 前

解決済み


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

9ヶ月 前

解決済み


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

9ヶ月 前

解決済み


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

9ヶ月 前

解決済み


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

9ヶ月 前

解決済み


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

9ヶ月 前

解決済み


Sum of integers numbers
Sum of the numbers from 1 to 100

9ヶ月 前

解決済み


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

9ヶ月 前

解決済み


Round to Nearest Multiple of 10^n

9ヶ月 前

解決済み


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

9ヶ月 前

解決済み


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

9ヶ月 前

解決済み


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

9ヶ月 前

解決済み


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

9ヶ月 前

解決済み


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

10ヶ月 前

解決済み


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

10ヶ月 前

解決済み


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

10ヶ月 前

解決済み


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

10ヶ月 前

解決済み


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

10ヶ月 前

解決済み


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

10ヶ月 前

解決済み


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

10ヶ月 前

解決済み


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

10ヶ月 前

解決済み


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

10ヶ月 前

解決済み


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

10ヶ月 前

解決済み


Magnitude of a vector
Given a vector x, what is its magnitude?

10ヶ月 前

解決済み


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

10ヶ月 前

解決済み


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

10ヶ月 前

解決済み


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?

10ヶ月 前

解決済み


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

10ヶ月 前

さらに読み込む