Answered

Format a large number into small decimal number

Lookup matlab built-in functions like simplify() or vpa(). This should do the work: vpa(r, 4)

Format a large number into small decimal number

Lookup matlab built-in functions like simplify() or vpa(). This should do the work: vpa(r, 4)

ongeveer een maand ago | 0

| accepted

Answered

Generate PDF image with 76cm x 240cm

All you have to do is put this at the end of your code: set(gcf, 'units', 'centimeters', 'PaperPosition', [0 0 240 76]) saveas...

Generate PDF image with 76cm x 240cm

All you have to do is put this at the end of your code: set(gcf, 'units', 'centimeters', 'PaperPosition', [0 0 240 76]) saveas...

ongeveer een maand ago | 0

| accepted

Solved

How to find the position of an element in a vector without using the find function

Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

ongeveer een maand ago

Submitted

CT Basic reconstruction algorithms

Functions demonstrating the basic principles of image reconstruction in computed tomography.

ongeveer een maand ago | 14 downloads |

Solved

Circumscribed circles

Given the lengths of the 3 sides of a triangle, output the radius of the circumscribed circle. Example: [3 4 5] -> 2.5

ongeveer 2 maanden ago

Solved

What is the distance from point P(x,y) to the line Ax + By + C = 0?

Given a point, P(x,y), find the distance from this point to a linear line. INPUTS: x, y, A, B, C OUTPUTS: d, the distance ...

ongeveer 2 maanden ago

Solved

Is the Point in a Circle?

Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...

ongeveer 2 maanden 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...

ongeveer 2 maanden ago

Solved

Volume of a Parallelepiped

Calculate the volume of a Parallelepiped given the vectors for three edges that meet at one vertex. A cube is a special case ...

ongeveer 2 maanden 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...

ongeveer 2 maanden 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...

ongeveer 2 maanden ago

Solved

Special matrix

Make a square matrix with this shape. For n=4 M = 1 1 0 0 1 0 1 0 0 1 0 ...

ongeveer 2 maanden ago

Solved

Mirror Image matrix across anti-diagonal

Given an input number x, create a mirror image matrix 'Y' across the anti-diagonal. For example, if x=3, Y = [1 2 3; ...

ongeveer 2 maanden ago

Solved

Create Volcano (or Atoll) martix. It is an extension of Bullseye matrix problem.

For example, if n=2 (maximum value), the output matrix should be [1 1 1 1 1; 1 2 2 2 1; 1 2 1 2 1; 1 2 2 2 1; 1...

ongeveer 2 maanden ago

Solved

Pascal's Matrix

Given an integer n ≥ 0, generate the ( _n_+1) × ( _n_+1) lower triangular <http://en.wikipedia.org/wiki/Pascal_matrix P...

ongeveer 2 maanden ago

Solved

Permute diagonal and antidiagonal

Permute diagonal and antidiagonal For example [1 2 3;4 5 6;7 8 9] -> [3 2 1;4 5 6;9 8 7] WITHOUT diag function (and variable n...

ongeveer 2 maanden ago

Solved

Rotate input square matrix 90 degrees CCW without rot90

Rotate input matrix (which will be square) 90 degrees counter-clockwise without using rot90,flipud,fliplr, or flipdim (or eval)....

ongeveer 2 maanden ago

Solved

Matrix with different incremental runs

Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

ongeveer 2 maanden ago

Solved

surrounded matrix

With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

ongeveer 2 maanden ago

Solved

Make an awesome ramp for a tiny motorcycle stuntman

Okay, given a vector, say v=[1 3 6 9 11], turn it into a matrix 'ramp' like so: m=[1 3 6 9 11; 3 6 9 11 0; 6 9 ...

ongeveer 2 maanden ago

Solved

N-Dimensional Array Slice

Given an N-dimensional array, _A_, an index, _I_, and a dimension, _d_, return the _I_ th elements of _A_ in the _d_ dimension. ...

ongeveer 2 maanden ago

Solved

Remove the air bubbles

Given a matrix a, return a matrix b in which all the zeros have "bubbled" to the top. That is, any zeros in a given column shoul...

ongeveer 2 maanden ago

Solved

Smith numbers

Return true if the input is a Smith number in base ten. Otherwise, return false. Read about Smith numbers at <http://en.wikipedi...

ongeveer 2 maanden ago

Solved

Kaprekar numbers

Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

ongeveer 2 maanden ago

Solved

Narcissistic number ?

Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

ongeveer 2 maanden ago

Solved

Bell Number calculator

Calculate a vector of Bell numbers for sets up to length n. Bell numbers are the maximum number of partitions of a set. See the ...

ongeveer 2 maanden ago

Solved

Polite numbers. Politeness.

A polite number is an integer that sums of two or more consecutive positive integers. Politeness of a positive integer is a num...

ongeveer 2 maanden ago

Solved

N-th Odious

Given index n return n-th <https://oeis.org/A000069 odious number>.

ongeveer 2 maanden ago

Solved

Find the 9's Complement

Find the 9's complement of the given number. An example of how this works is <http://electrical4u.com/9s-complement-and-10s-c...

ongeveer 2 maanden ago

Solved

Create a matrix map of increasing safety levels

The sole nuclear power plant at Grid City suddenly had a meltdown. Luckily, the plant was designed to be in full automation, so ...

ongeveer 2 maanden ago