Solved


An n-sided regular polygon is drawn within a circle whose radius is 'r', what will be the area of the polygon?
area of a polygon is p*a/2. where, p is the perimeter and a is the apothem i.e. the normal distance from center to any of the si...

2 months ago

Solved


Summing Rows and Columns
Create a matrix y of size (n+1) whose last column's elements are the summation of the elements of all the other columns and last...

2 months ago

Solved


D'Hondt Method of Proportional-Representation
The D'Hondt method is a proportional representational method for allocating seats to parties in an election. <https://en.wiki...

2 months ago

Solved


What time can I drive after drinking?
At T o'clock, after a hard day of Matlab, I immediately start drinking and treat myself to N pints of tasty beer. Each beer I dr...

2 months ago

Solved


Float like a cannonball
Given gravity on earth (g=9.81 [m/s/s]) find the distance s [m] by a cannonball propelled at a speed of u [m/s] from the origin ...

2 months ago

Solved


Vogel-Dobbener entropy
*Vogel-Dobbener entropy* is a measure of dispersion for ordinal variables. Given an ordered list of distinct observations u_...

2 months ago

Solved


Compound Interest Rate Calculation With Yearly Deposition Into A Bank Account
The problem adds a twist to the compound interest calculation by having the bank account owner depositing a fixed amount of mone...

2 months ago

Solved


Find the centre of an arc and its radius
Given two points on an arc (x0,y0) and (x1,y1) and the angle between them, alpha. Return the centre of the circle and the radiu...

2 months ago

Solved


Pascal's Equilateral triangle inside a Matrix!!!
Given a number of row 'n', generate the following pascal's matrix 'p' where spaces are filled by 'zeros'. number of row, n = ...

2 months ago

Solved


Rearrange the given matrix to have all its zeros climb up to the top of each column - using for loops.
Given a matrix x, *using loops only* return a matrix y, in which all the zeros have "climbed" up to the top. That is, any zeros ...

2 months ago

Solved


Create a 3D rotation matrix from roll-pitch-yaw angles
Consider a robotics application where the world reference coordinate frame {W} and a robot manipulator arm with an attached tool...

2 months ago

Solved


Parsing Expressions - Binary Arithmetic Operators I
Parse and evaluate expressions like these: '1 + 2' '51 - 78' '42 * 9' The only operators are +, -, *. Both argu...

2 months ago

Solved


Invert a 3D rotation matrix
Given a 3D rotation matrix, belonging to the matrix group SO(3), compute its inverse without using the functions inv() or pinv()...

2 months ago

Solved


Invert a 3D rigid-body transformation
Given an SE(3) matrix representing a rigid-body motion, compute its inverse without using |inv()| or |pinv()| .

2 months ago

Solved


Create a 3D rotation matrix
Consider an arbitrary coordinate frame {A}. Consider another coordinate frame {B} which has the same origin as {A} but is rotat...

2 months ago

Solved


Orientation of a 3D coordinate frame
The orientation of a body-fixed frame {B} with respect to the world frame {W} is described by an SO(3) rotation matrix. Compute...

2 months ago

Solved


Determine roll pitch yaw angles from a 3D rotation matrix
Consider an aerospace application where the world reference coordinate frame {W} and a body-fixed coordinate frame {B}. The ori...

2 months ago

Solved


Given a matrix A return a vector of the product of the elements in each column using a loop without using prod.
--------------------- for m: 3 1 3 3 10 1 9 1 9 4 1 4 5 6 5 ...

2 months ago

Solved


Bridge and Torch Problem - Probability
<https://en.wikipedia.org/wiki/Bridge_and_torch_problem Details of the problem ...> There are four people who wants to cross...

2 months ago

Solved


Given a matrix A (size m x n) create a matrix B which consists of matrix A sorted in descending order by columns and then by rows.
--------------- A= [ 2 6 -3 7 12 0 -12 5 1] --------------- B= [12 7 1 6 2 0 5 -3 ...

2 months ago

Solved


Given a matrix A (size m x n) create a matrix B (size m+2 x n+2) which consists of matrix A surrounded by zeros. See Example below:
A = [1 2 3 4 5 6] ----------- B = [0 0 0 0 0 0 1 2 3 0 0 4 5 6 0 0 0 0 0 0]

2 months ago

Solved


Given a Vector v1, create v2 which is the sum of each two adjacent elements in v1. {length(v2)=length(v1)-1}
if v1 is [1 2 3 4 5 6 7 8] then v2 should be [3 5 7 9 11 13 15]. if v1 is [1; 3; 5; 7] the...

2 months ago

Solved


Bridge and Torch Problem - Length of Unique Time List
<https://en.wikipedia.org/wiki/Bridge_and_torch_problem Details of the problem ...> Input is crossing time list. (for exampl...

2 months ago

Solved


Bridge and Torch Problem - Minimum time
<https://en.wikipedia.org/wiki/Bridge_and_torch_problem Details of the problem ...> Input is crossing time list. (for exampl...

2 months ago

Solved


Opposite point of the earth, what is the antipodal of a point ?
Given two strings(lat and long) that represent the geographic coordinates of a point in the earth, you have to find out what is ...

2 months ago

Solved


CowBoy
A group of cowboys standing in circle form. They have one gun. The first cowboy shoot the cowboy beside him (second one) and giv...

2 months ago

Solved


Angle between two vectors
Given 2 pairs of _cartesian co-ordinates_, determine the angle between the 2 vectors formed by the _points_ and the _origin_. An...

2 months ago

Solved


Calculate Resistance 2
In this problem, you have to calculate Resistance R of a linear conductor having voltage V across it and current I is passing i...

2 months ago

Solved


Calculate Resistance
Calculate Resistance R of a linear conductor having resistivity p, length l and area A

2 months ago

Solved


Efficiency of a single phase Transformer
Calculate the efficiency of a single phase transformer whose KVA rating is A KVA, loading factor x,power factor p,full load copp...

2 months ago

Load more