Solved


Enlarge array
Given an m-by-n numeric array (A) and a 1-by-2 vector (sz) indicating the dimensions [p q] to enlarge each element, return an (m...

6 years ago

Solved


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

6 years ago

Solved


Step number
Step number

6 years ago

Solved


Electric Potential Energy

6 years ago

Solved


Half-Swap
Given a vector with an even number of elements, rearrange it so that the elements in its first half are switched with those i...

6 years ago

Solved


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

6 years ago

Solved


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

6 years ago

Solved


No more zeros
Given an array with zeros at the beginning or at the end, you should get the output without these zeros: input = [zeros(5...

6 years ago

Solved


concatenate the elements
you should concatenate the elements of a matrix in one dimensional array, for example if the input is A = [1 2 3; 4 5 6; 7 ...

6 years ago

Solved


determine the sum of the squares
if x = 4, the solution will be: y = 1^2+2^2+3^2+4^2=1+4+9+16 = 30.

6 years ago

Solved


sum all digits
input = 123456789, output = 1+2+3+4+5+6+7+8+9 = 45

6 years ago

Solved


Can the given sides form a triangle?
Can the three given sides form a triangle?

6 years ago

Solved


Divisible by 21
Write a function to determine if a number is divisible by 21.

6 years ago

Solved


Given a number N, find the smallest prime P>N
Given a number N, find the smallest prime P greater than N. For example: If N=10 then P=11. If N=13 then P=17.

6 years ago

Solved


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

6 years ago

Solved


solve for y that is half as much as three less than one tenth of x
function y = half(x) y = (x * .1); end

6 years ago

Solved


Duplicates
Write a function that accepts a cell array of strings and returns another cell array of strings *with only the duplicates* retai...

6 years ago

Solved


Sort in descending order.

6 years ago

Solved


Check if is a square
Given four coordinates, write a function to check if they form a square on the XY plane.

6 years ago

Solved


Ratio between sum of primes and sum of factors
Write a function that calculates the ratio between the sum of primes numbers lower or equal to x, and the sum of the factors of ...

6 years ago

Solved


Ratio between sums of prime and non-prime numbers
Write a function that calculates the ratio between the sum of the prime numbers lower or equal than x, and the sum of the non-pr...

6 years ago

Solved


Say type of roots in quadratic equation
Given the coefficients of a quadratic equation, write a function that gives the output y='RealDifferent' if the roots are real a...

6 years ago

Solved


Get the value 100
Knowing that 123-45-67+89=100, write a function that gives this result for any order of the digits in the input. Otherwise, the ...

6 years ago

Solved


Double the next!
Given two numbers, m and n, find a matrix m x n where each element value is twice the value of the previous element. Starting fr...

6 years ago

Solved


Separate even from odd numbers in a vector - with a loop
*Using a loop*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the end. T...

6 years ago

Solved


Laws of motion 6

6 years ago

Solved


Laws of motion 1

6 years ago

Solved


Laws of motion 3

6 years ago

Solved


Laws of motion 5

6 years ago

Solved


Laws of motion 4

6 years ago

Load more