Solved


Electric Power Steering (EPS) Motor Torque with Efficiency
In EPS systems, the motor must generate additional torque to compensate for system losses. Given Required assist torque at rack...

6 days ago

Solved


Splitting Circle
Consider a circle which has been divided into three concentric circles as depicted in the figure below The ratio betwen the a...

6 days ago

Solved


Sum all elements of a vector or matrix without using some built in functions
Write a function that computes the sum of all elements of the input array v without using the following built-in function: sum,...

6 days ago

Solved


Return the product of all elements of a vector or matrix without using built-in functions
Compute the product of all elements of the input array without using the built-in functions prod, ans, or size.

6 days ago

Solved


Double the 2x2 Matrix
In this challenge, you are given a predefined 2x2 matrix called x. Your task is to multiply every element in this matrix by 2 an...

6 days ago

Solved


Sky full of stars - 03
draw the following pattern with asterisks. For example, for n=6 '************' '***** *****' '**** ****' ...

6 days ago

Solved


King's Cage
Given the position of the king on the chessboard, determine the minimum number of steps it'll require to reach the destination. ...

6 days ago

Solved


COUNT LETTERS
Count the number of letters in a given string. For Example: STR='The MAtlAb code'; output:T 2 H 1 E 2 M 1 A 2 L 1 B 1 C 1 O 1 D ...

6 days ago

Solved


find "greatest common divisor" of two integer value
A function to find Greatest Common Divisor of two integer input E.G. x=-18 y=96 output should be +6 x=-18; y=96; >>your...

6 days ago

Solved


sort matrix
Given a matrix, sort it for each column, but cannot change the element of each row. for example input = [1 3; 2 4;1 5;3 6]; ...

6 days ago

Solved


Probabilities - Balls and urns - 02
The urn contains B blue balls and R red balls. Each trial consists of drawing one random ball from the urn and observing its col...

6 days ago

Solved


Find the index of the first occurrence of a value in a matrix
Given a matrix of scalars, find the first occurrence of -1 in each column. Output NaN for a column which does not contain the va...

6 days ago

Solved


Percentage profit:3
x% product is sold at r1% profit. However, our target overall profit is rt%. What is the required percentage profit to meet the ...

6 days ago

Solved


Rearrange string
Input is a given string. Output is the number of ways to rearrange the string.

6 days ago

Solved


Leading-zero padding
Write a function that will add leading-zero padding to all numbers in the supplied vector, as necessary, based on the maximum nu...

6 days ago

Solved


Generalized Fibonacci
The Fibonacci sequence is defined as: Fib(1) = 0 Fib(2) = 1 Fib(N) = Fib(N-1) + Fib(N-2) The Fibonacci sequence can be gener...

6 days ago

Solved


Iterative sum of digits of 2^n number
Given n, calculate the number 2^n (where n>=0) and iterate until the sum of the digits is a single-digit number. Example: Inp...

6 days ago

Solved


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Input...

6 days ago

Solved


Compute Fibonacci Number
Compute the n-th Fibonacci Number f(0) = 0, f(1) = 1, f(2) = 1, f(3) = 2, ... f(42) = 267914296

6 days ago

Solved


GJam 2013 Veterans: Ocean View (Small)
This Challenge is derived from <http://code.google.com/codejam/contest/2334486/dashboard#s=p2 GJam 2013 Veterans Ocean View>. Th...

6 days ago

Solved


Remove Missing Values from a Table or an Array
Remove missing entries from an array or table. If A is a vector, then remove any entry that contains missing data. If A is a mat...

6 days ago

Solved


Modulo with 5

6 days ago

Solved


Logic 7

6 days ago

Solved


IQpuzzler Preparation #2: Detect isolated zeros in a 2D matrix
Return true if any isolated single zeros are present in the input M-by-N matrix (zeros with all adjacent elements being non-zero...

6 days ago

Solved


Sample from random roulette
Given a list of values and their probabilities sample 10,000 values. Example: x = [1 2 3 4 5]; prob = [0.2 0.1 0.4 0.1 0.2] ...

6 days ago

Solved


A kind of decryption
Please convert the vector to letters by referring to the examples below. (eg.1) input vec=[34 1 59] >>> output s='A Z' (eg...

6 days ago

Solved


Find the remainder with the factorial of PRIMES?
* Take a number greater than or equal to 2 and take its primes. e.g. 6 and its primes are 2 3 5 * calculate the factorial of i...

6 days ago

Solved


Decrypt the cypher using XOR encryption (for beginners)
Inspired by Project Euler n°59 Each character on a computer is assigned a unique code and the preferred standard is ASCII (...

6 days ago

Solved


Beauty of Parentheses
Given a string consisting of closed parentheses, form a string array in the following way so that the orders of these parenthese...

6 days ago

Load more