Solved


Summing digits
Given n, find the sum of the digits that make up 2^n. Example: Input n = 7 Output b = 11 since 2^7 = 128, and 1 + ...

4 years ago

Solved


Sorted highest to lowest?
Return 1 if the input is sorted from highest to lowest, 0 if not. Example: 1:7 -> 0 [7 5 2] -> 1

4 years ago

Solved


Given a matrix A return a vector of the product of the elements in each column using a loop without using prod.
--------------------- for m: 3 1 3 3 10 1 9 1 9 4 1 4 5 6 5 ...

4 years ago

Solved


Find the Oldest Person in a Room
Given two input vectors: * |name| - user last names * |age| - corresponding age of the person Return the name of the ol...

4 years ago

Solved


Check if number is a square number
Test if integer i is a square number. Return logical true if it is.

4 years ago

Solved


An Ohm's Law Calculator
*BACKGROUND / MOTIVATION:* Many important observations in math and science can be described by short, but powerful, equations...

4 years ago

Solved


Return the 3n+1 sequence for n
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

4 years ago

Solved


Find square of given number
Find Square of any number

4 years ago

Solved


Square root of number
Square root of given number.

4 years ago

Solved


Sum Sum Sum!
Calculate the sum of the natural numbers from 1 to n

4 years ago

Solved


Perimeter of a square!
Calculate the circumference of the square whose side is n

4 years ago

Solved


Sum sum!!!
Sum the numbers from 1 to n

4 years ago

Solved


Calculate the square root of a number
Input a Output b = srt(a)

4 years ago

Solved


calculate the length of matrix
input 1 array, calculate the length

4 years ago

Solved


Find the max element of the array
Find the max element of the array

4 years ago

Solved


easy problem
Find the last element of the array

4 years ago

Solved


the average value of the elements
Calculate the average value of the elements in the array

4 years ago

Solved


Converts numbers into characters
Converts numbers into characters

4 years ago

Solved


to the 2 all elements
to the 2 all elements

4 years ago

Solved


Given a vector x, return vector y with all negative elements from the vector x.
Given a vector x, return vector y with all negative elements from the vector x if x has negative elements. Otherwise return 0. ...

4 years ago

Solved


Calculate the area of a circle
Given a circle of diameter x calculate its area

4 years ago

Solved


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

4 years ago

Solved


Find the sum of the elements in the "second" diagonal
Find the sum of the elements in the diagonal that starts at the top-right corner and ends at the bottom-left corner.

4 years ago

Solved


Given a 4x4 matrix, swap the two middle columns
If a = [1 2 3 4; 1 2 3 4; 1 2 3 4; 1 2 3 4]; then the result is ans = 1 3 2 4 1 3 2...

4 years ago

Solved


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

5 years ago

Solved


Getting the indices from a vector
This is a basic MATLAB operation. It is for instructional purposes. --- You may already know how to <http://www.mathworks....

5 years ago

Solved


Column Removal
Remove the nth column from input matrix A and return the resulting matrix in output B. So if A = [1 2 3; 4 5 6]; ...

5 years ago

Solved


Return area of square
Side of square=input=a Area=output=b

5 years ago

Solved


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

5 years ago

Solved


Add two numbers
Given a and b, return the sum a+b in c.

5 years ago

Load more