Solved


Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix. For example if a ...

2 years ago

Solved


convert?
* Given a string containing a number followed by pounds or kgs, for example: * 'Billy lost 22 pounds in four weeks.' * 'Maria ...

2 years ago

Solved


Matrix Indexing
Given a matrix A and scalars r,c,i, find the product of two elements, with the first element located at row r and column c (doub...

2 years ago

Solved


Tribonacci Sequence
Generate the tribonacci sequence upto n

2 years ago

Solved


I'm going to enjoy watching you calculate, Mr Anderson
Smith numbers are numbers such that if you add up all of the digits in the number, that sum equals the sum of all of the digits ...

2 years ago

Solved


SAY 'OHYEAH'
Regardless of input, output the string 'OHYEAH'.

2 years ago

Solved


PIN code III

2 years ago

Solved


Pass the Threshold!!
Write a Matlab function that will take as input a matrix of arbitrary dimensions and a scalar threshold value, and return a vec...

2 years ago

Solved


Calculate the volume of a cone
Calculate the volume of a cone given an array containing one column of radii and one column of the height of the cone. * Reme...

2 years ago

Solved


Make visible max values
Make visible maximum values of rows input = [1 2 3 4 5; 6 9 8 2 1; 2 1 4 5 8; 1 9 7 9 2]; ...

2 years ago

Solved


Determine if given number is perfect
A number is perfect if it is equal to the sum of its factors, excluding itself. Example The number 6 is perfect since its fact...

2 years ago

Solved


Falling on the Moon.

2 years ago

Solved


find the index of a number

2 years ago

Solved


Prime number check (★★)
One way to see if a number x is prime is to compute the remainders obtained when dividing x by all integers from 2 to √(x). If x...

2 years ago

Solved


Sum of a geometric series
Give the sum of the first 'n' terms of a geometric series, given 'a' as the first term and 'r' as the ratio.

2 years ago

Solved


Find the complement of a number in binary
Input x is a decimal number and output y is the complement of binary representation of x. For example, x = 10 has the binary ...

2 years ago

Solved


Calculate the h-index
H-index is a powerful tool for quantifying the scientific contribution of a researcher. H-index is defined as follows (source - ...

2 years ago

Solved


String Logic 1
Examples: 'CAT' --> 'IGZ' 'DOG' --> 'JUM'

2 years ago

Solved


Compute the area of a lune
Write a function to compute the area of the shaded moon-shaped region in the figure below—that is, the area of a smaller circle ...

2 years ago

Solved


how many of the entries are positive?
Given x= sin(linspace(0,10*pi,100)), how many of the entries are positive?

2 years ago

Solved


Height of a 3D Pyramid
If a pyramid is made with one(1). What will be the height of the pyramid of square shaped base(n*n)? where input is n.

2 years ago

Solved


Determine the perimeter of a three-quarter circle
If a circle has a diameter of x as an input value, then show the value of the perimeter of the three-quarter circle in output va...

2 years ago

Solved


Find the numeric characters in a string and return their index
Given a string S, return the index of any numeric characters. S = 'The next meeting will be held in 2 weeks.'; idx = fin...

2 years ago

Solved


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

2 years ago

Solved


count any radix?
given radix r(2-9), digts d(1-4), give all possible strings in sorted order. for example, if r=2, d=2, then output {'00' '01' '1...

2 years ago

Solved


Two dimensional moving average
A=[1 2 3 4 5 1 2 2 2 3 2 3 3 3 4 1 1 4 4 2] B=[1 1;1 1]; % This is can be used for weight factor of moving a...

2 years ago

Solved


Minimize a quadratic function
Write a function to minimize the function . The coefficients a, b, and c will be positive. Give the coefficients in a vector coe...

2 years ago

Load more