Gelöst


Calculate compression ratio of engine
Calculate compression ratio of engine given compression volume of cylinder(Vc), piston stroke(s) and valve diameter(d)

mehr als 5 Jahre vor

Gelöst


Calculate Engine Power
Calculate Engine Power (P) in kW given the values of Torque(M) in Nm and Engine Speed(n) in rpm

mehr als 5 Jahre vor

Gelöst


Convert Two Character String into a Binary Vector
Given a string "XOXXO" convert it into a binary vector. [1 0 1 1 0] Paul Berglund implemented an optimal method in <http://ww...

mehr als 5 Jahre vor

Gelöst


Numbers at bit-boundary
Find if a number is on or below the bit-boundary, as defined below. Examples 7,9 straddle the bit-boundary at 2^3 as do 31...

mehr als 5 Jahre vor

Gelöst


Net Present Value of a Stream of Cash Flows
Calculate <https://en.wikipedia.org/wiki/Present_value the net present value of a future cash flow> vector given; * future ca...

mehr als 5 Jahre vor

Gelöst


Index of a Rational number
The set of real numbers are infinite. They are so many that real numbers can't even be enumerated. However, unlike real numbers ...

mehr als 5 Jahre vor

Gelöst


Game of Nim
The Game of Nim is a famous studied 2 player strategy game. <http://en.wikipedia.org/wiki/Nim> There are 3 heaps, and you...

mehr als 5 Jahre vor

Gelöst


Method of Common Differences part-1
Use the method of common differences to output a vector containing the initial values and the nth order difference. ex ...

mehr als 5 Jahre vor

Gelöst


Generate binary combinations for a given number of bit(s)
Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

mehr als 5 Jahre vor

Gelöst


Procrustean bed
Given a vector x and an integer n, convert x to a vector of length n by (1) chopping off the end if it is too long, or (2) addin...

mehr als 5 Jahre vor

Gelöst


Simple problem creating a function from an abstract specification.
MYSTERYFUNCTION3 This takes a vector of numbers v and computes a vector w such the w[i] is the average of v[i] and the previous...

mehr als 5 Jahre vor

Gelöst


Sort (high on middle, low on ends)
Sort the vector of numbers in order low-high-low. Even numbers appear in ascending order on the left and odd numbers appear in d...

mehr als 5 Jahre vor

Gelöst


factor to number
e.g. input number x=10 then it should produce y=25 or x=100 then y should be 2255. write a function or code to generate the same...

mehr als 5 Jahre vor

Gelöst


generate a matrix of Legendre polynomials
input = x - the degree of the polynomial output = matrix of Legendre polynomials

mehr als 5 Jahre vor

Gelöst


CARDS PROBLEM
Read my mind and tell me the card number that I have now in my hands.

mehr als 5 Jahre vor

Gelöst


SHIFT REGISTER
INPUT IS DECIMAL NUMBER. CONVERT IT INTO A BINARY SEQUENCE. THEN SHIFT THE SEQUENCE BY AN AMOUNT OF GIVEN NUMBER OF BITS. FOR E...

mehr als 5 Jahre vor

Gelöst


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

mehr als 5 Jahre vor

Gelöst


ABBREVIATION
Abbreviate the given string. Consider Only Capital Letters. EXAMPLE If input is 'Abbreviation of The Given String' then ou...

mehr als 5 Jahre vor

Gelöst


BULLSEYE Part 2: Reference Problem 18 BULLSEYE
Given n (always odd), return output a that has concentric rings of the 1s and 0s around the center point. Examples: Input ...

mehr als 5 Jahre vor

Gelöst


BULLSEYE Part 3: Reference Problem 18 BULLSEYE
Given n (always odd), return output a that has concentric rings of the 69s and 0s around the center point. Examples: Input ...

mehr als 5 Jahre vor

Gelöst


Josephus Survivor
The <http://en.wikipedia.org/wiki/Josephus_problem Josephus Challenge> is to find the position that is the last remaining when e...

mehr als 5 Jahre vor

Gelöst


Create different color vectors.
When producing figures with multiple lines on, you often want the lines to all be visible and different colors. Given the need f...

mehr als 5 Jahre vor

Gelöst


Determine which fields have been modified in a structure
Given two input structures (s1, s2), determine which field values have been modified in s2 compared to s1. Your output should be...

mehr als 5 Jahre vor

Gelöst


Return elapsed time
Write a function that returns the amount of time it takes to run the function, as measured by tic and toc. Your answer must be c...

mehr als 5 Jahre vor

Gelöst


Morse Code Generator! Try it!
.... . .-.. .-.. --- . ...- . .-. -.-- --- -. . -.-.-- .-.. . - ... -.. --- ... --- -- . -- --...

mehr als 5 Jahre vor

Gelöst


Triangular matrices in 3D array
Given a 3D numeric array _x_, return an array _y_ of the same size in which all entries to the right of the main diagonal are ze...

mehr als 5 Jahre vor

Gelöst


Can you beat the lottery?
Well this one you may not get every time, but it is a lottery! Here is the code that generates the lottery numbers (you can try ...

mehr als 5 Jahre vor

Gelöst


Do the lines intersect?
You are given two line segments. Do they cross? Consider one segment as (x1,y1) to (x2,y2), the other segment as (x3,y3) to (...

mehr als 5 Jahre vor

Gelöst


Can you beat the lottery again (for hardcore coder) ?
Inspired by the Problem 1713 by Chris E. Here is the code that generates the first lottery number: rng('shuffle'); numb...

mehr als 5 Jahre vor

Gelöst


Primes Faster for Large N
This Challenge is to improve the "primes" function for speed. This may be accomplished by fixing memory usage. The Matlab fun...

mehr als 5 Jahre vor

Mehr laden