已解决


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

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


Find square of given number
Find Square of any number

5 years 前

已解决


Square root of number
Square root of given number.

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


easy problem
Find the last element of the array

5 years 前

已解决


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

5 years 前

已解决


Converts numbers into characters
Converts numbers into characters

5 years 前

已解决


to the 2 all elements
to the 2 all elements

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


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

5 years 前

已解决


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.

5 years 前

已解决


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

5 years 前

已解决


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 前

已解决


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 前

已解决


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 前

已解决


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

5 years 前

已解决


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 前

已解决


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

5 years 前

加载更多