Solved

cross in array

Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

2 years ago

Solved

Find Factrorial without using built-in function

A number is given, you have to find the factorial of the number without using built-in factroial function. You may use loops....

2 years ago

Solved

Find the sum of n squares

What is the sum of the squares of the first n integers?

2 years ago

Solved

Fizz Buzz

Given an array of positive, non-zero, integers, return a cell array of strings the same size as the input, where each element in...

2 years ago

Solved

Basics: Divide integers to get integer outputs in all cases

Divide integers a and b in such a way that output y is always an integer (in ceil manner)

2 years ago

Solved

Convert hex color specification to MATLAB RGB

Here's something that comes up all the time if you deal with web pages. Given a <http://www.w3schools.com/html/html_colors.as...

2 years ago

Solved

Volume of a sphere given its surface area

You just measured its surface area, that is the input.

2 years ago

Solved

Average Grade

Given a 1x5 vector presents the grades of a student on five tests. Calculate the average grade of that student.

2 years ago

Solved

Put Two 1D matrices into one 1D matrix

Example: If input a = [1 2 3 4 5]; input b = [10 9 8 7 6]; then output will be, y_correct = [1 10 2 9 3 8 4 7 5...

2 years ago

Solved

does it touch ?

given a sentence, tell how much it touches. input : string output : how much it touches touching : a bilabial phoneme d...

2 years ago

Solved

Reverse a string

Reverse the given string. Example input = 'reverse' output = 'esrever'

2 years ago

Solved

How many Integers?

Count the integers in a given vector |v|. You *must* use a loop to count each element separately. Examples: Input: v...

2 years ago

Solved

Add a vector to a matrix

Given a matrix |mat| of size |mXn| and a row vector |v| of size |1Xs|, return a matrix with |m+1| rows that conatains |mat| over...

2 years ago

Solved

metre to feet converter

The idea is to make a converter, which exchange meters to feets. We use a factor of 1m = 3.281*1f. so 3m are equals to 9.843 m...

2 years ago

Solved

Matrix with different incremental runs

Given a vector of positive integers a (>=0); How does one create the matrix where the ith column contains the vector 1:a(i) poss...

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

2 years ago

Solved

Find the area of a rectangle if length of the diagonal is given.

if length of a diagnonal in rectangle is 5. Its area is 12.

2 years ago

Solved

Matlab Basics II - Log and natural log

Write a function that calculates the difference between the log and natural log of a vector, to two decimal places example: ...

2 years ago

Solved

Multiples of a Number in a Given Range

Given an integer factor _f_ and a range defined by _xlow_ and _xhigh_ inclusive, return a vector of the multiples of _f_ that fa...

2 years ago

Solved

UICBioE240 problem 1.5

Find the size of the matrix, then multiply both values by 10 and make it into a column vector. So if A = [ 1 2 3; ...

2 years ago

Solved

Find the position of first minimum value in an integer array with numbers

If x = [2 6 4 9 10 3 1 5 1] the the output should be 7, because the first minimum value (1) lies at the 7th position.

2 years ago

Solved

Signed Magnitude

For a given input vector, return the value that is furthest from zero. For example, if x = [1 2 -12] return -12.

2 years ago

Solved

Relative ratio of "1" in binary number

Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

2 years ago