Solved

Find and replaces spaces from a input string with *
For a given input string str, find how many spaces are there in the string and replace those spaces with * e.g. str = 'this is ...

11 mesi 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

11 mesi ago

Solved

Wrapping the Tower of Pisa
The famous artist Christo Vladimirov Javacheff, who likes pizza, wants to wrap the well-known Italian tower in paper. It is a ci...

11 mesi ago

Solved

Project Euler: Problem 10, Sum of Primes
The sum of the primes below 10 is 2 + 3 + 5 + 7 = 17. Find the sum of all the primes below the input, N. Thank you <http:/...

11 mesi ago

Solved

Multiply a column by a row
* Given a column vector C and and a row vector R. * Output a matrix M. * Every column of M equals to C multiplied by correspon...

11 mesi ago

Solved

Squaring Matrix
Square the following matrix using matlab % A = 1 2 3 4 5 6 7 8 So new matrix should display...

11 mesi ago

Solved

Convert from Base 10 to base 5
Convert the input number from base 10 into base 5: for example: if a(in base 10)= 5 then a(in base 5)= 10

11 mesi ago

Solved

Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...

11 mesi ago

Solved

Create a square matrix of multiples
Given an input, N, output a matrix N x N with each row containing multiples of the first element of each row. This also applies...

11 mesi ago

Solved

Find the body mass index. For reference, please refer to Wikipedia here: <http://en.wikipedia.org/wiki/Body_mass_index body ...

11 mesi ago

Solved

2 b | ~ 2 b
Given a string input, output true if there are 2 b's in it, false if otherwise Examples: 'Macbeth' -> false 'Publius Cor...

11 mesi ago

Solved

Remove entire row and column in the matrix containing the input values
Remove the entire row and column from the matrix containing specific values. The specified value can be a scalar or a vector. Fo...

11 mesi ago

Solved

Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

11 mesi ago

Solved

Create a vector
Create a vector from 0 to n by intervals of 2.

11 mesi ago

Solved

Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

11 mesi ago

Solved

Get the length of a given vector
Given a vector x, the output y should equal the length of x.

11 mesi ago

Solved

Find max
Find the maximum value of a given vector or matrix.

11 mesi ago

Solved

Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

11 mesi ago

Solved

Television Screen Dimensions
Given a width to height ratio of a TV screen given as _w_ and _h_ as well as the diagonal length of the television _l_, return t...

12 mesi ago

Solved

Covering area
As an extension of the problem <http://www.mathworks.com/matlabcentral/cody/problems/416-polygon-area>, find the area, bounded b...

12 mesi ago

Solved

Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vert...

12 mesi ago

Solved

Clockwise or Counterclockwise
Given a list of 2-d points defining the vertices of a polygon, determine whether these points are sorted clockwise. The input...

12 mesi ago

Solved

Angle between Two Vectors
The dot product relationship, a dot b = | a | | b | cos(theta), can be used to determine the acute angle between vector a and ve...

12 mesi ago

Solved

Clock Hand Angle 1
Given a time in HH:MM:SS, find the smallest angle (in degrees) between the hour and minute hand

12 mesi ago

Solved

Spherical radius given four points
Determine the radius of a sphere provided four non-coplanar points on the surface of the sphere. pts = [x1 y1 z1; x...

12 mesi ago

Solved

Double the next!
Given two numbers, m and n, find a matrix m x n where each element value is twice the value of the previous element. Starting fr...

12 mesi ago

Solved

Derivative of polynomial
Compute the derivative of a given polynomial. The input is an <http://www.mathworks.com/help/matlab/math/representing-polynomial...

circa un anno ago

Solved

Are all the three given point in the same line?
In this problem the input is the coordinate of the three points in a XY plane? P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) how can...

circa un anno ago

Solved

Determine if input is odd or even
Determine if input is odd or even, sample problem

circa un anno ago

Solved

Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

circa un anno ago