Solved


Ring Matrix
Given n (only odd), return output matrix a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. ...

6 months ago

Solved


Create logarithmically spaced values (★)
Given three numbers a,b,n with b>a, create a vector y with n logarithmic spaced values between 10^a and 10^b. Thus, if a = -2, ...

6 months ago

Solved


Remove DC
Input x is the sampled signal vector, may have both AC and DC components. Output y should not contain any DC component. Examp...

6 months ago

Solved


Remove the air bubbles from a vector
_*A reduced version of Problem 112*_ Given a column vector v, return a vector w in which all the zeros have "bubbled" to the ...

6 months ago

Solved


Guess
A random number between 1 and 10 is created for the variable y. Guess what its value is.

6 months ago

Solved


Perimeter
Given a sequence of points forming a closed path (first and last points are coincident) return the perimeter value. For example...

6 months ago

Solved


Is there a GPU Device?
Return true if there is a supported GPU device available on the Cody computer.

6 months ago

Solved


Draw a '7' in a zero matrix!

6 months ago

Solved


Sum of elements in a vector (★)
(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

6 months ago

Solved


Find nth triangular number.
Calculate the triangular number of given integer n.

6 months ago

Solved


Given a matrix, swap the 2nd & 3rd 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...

6 months ago

Solved


Matrix Generation.
if input n =1, generate a matrix y = [1]

6 months ago

Solved


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

6 months ago

Solved


Guess the logic

6 months ago

Solved


Area of right triangle
Given a hypotenuse and a leg , calculate the area of right triangle.

6 months ago

Solved


Multiplying the Sums of Two Arrays
Get two arrays, add the values within the array up, and then multiply the two total values. [2,3]*[3,6] 5*18 90

6 months ago

Solved


Replace May with April
For instance, if the input is input_str = 'The flowers may bloom in April'; then the output is output_str = 'The flo...

6 months ago

Solved


Zero Out Negative Elements
Write a MATLAB function called zeroNegatives that takes a numeric vector v as input and returns a modified version where all neg...

6 months ago

Solved


Cancel Middle
Write a function called cancel_middle that takes A, an n-by-m matrix, as an input where both n and m are odd numbers an...

6 months ago

Solved


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

6 months ago

Solved


Sum of Even Numbers in a Vector
Write a function that takes a vector x as input and returns the sum of all even numbers in x. Input: x = [1, 2, 3, 4, 5, 6] ...

6 months ago

Solved


Return part of an array
Given a 5x5 array, return a 3x3 array that contains the cells that are not on the edge of the array: Given this array Return...

6 months ago

Solved


Which quadrant?
Given a complex number, output quadrant 'I' 'II' 'III' or 'IV' | II | I | ...

6 months ago

Solved


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

6 months ago

Solved


Find the nearest integer
Given a vector of integers and a real number find the closest integer. EX: >> a = [2 4 5 6 8 10]; >> b = 4.6; >> nea...

6 months ago

Solved


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

6 months ago

Solved


Add two different item as shown in example
Add two different item as shown in example x=5; y='ab'; Then output must be'5ab';

6 months ago

Solved


Get 1-4-3-4-4
Get the value of the indices in the title and assign it to an array

6 months ago

Solved


interesting center of magic matrix
output the centre of magic matrix of n input=7; output=25

6 months ago

Solved


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

6 months ago

Load more