已解决


Approximate the cosine function
Without using MATLAB trigonometric functions, calculate the cosine of an argument |x| to a precision of |0.0001| *Hint:* You ...

6 years 前

已解决


Roots of a quadratic equation.
Calculate the roots of a quadratic equation, given coefficients a, b, and c, for the equation a*x^2 + b*x + c = 0.

6 years 前

已解决


More Simple String Concatenation
Take the first string input, reverse the order of the string from the end to beginning (i.e. apple becomes elppa), add a space a...

6 years 前

已解决


Find the numeric characters in a string and return their index
Given a string S, return the index of any numeric characters. S = 'The next meeting will be held in 2 weeks.'; idx = fin...

6 years 前

已解决


find the logic,easy one
find the logic behind, example x=18 y=306 x=53 y=2756

6 years 前

已解决


Return the sequence element I
Given a positive integer, x, return a positive integer, y, which is the xth term in the sequence [1 2 2 3 3 3...], in which one ...

6 years 前

已解决


Reduce the logic
We have three logical input, x,y and z. The output is: y = ((x&y)|z)&((z|x&y)|(z&y|x))|((x&z)|z)&((y|x&z)|(z&x|y))|(x|y|z) ...

6 years 前

已解决


compare strings
Given 2 strings and 3 actions (Insert,delete,replace) on characters. Find the difference between two strings. Example: str...

6 years 前

已解决


Vector addition
Given two row vectors, v1 and v2, each representing an integer, such that the vector elements are the digits from left to right,...

6 years 前

已解决


Determinants
Given a square matrix(A), find the determinant(d). For example: A = [1,3;4,5] d = 1*5-4*3 = -7

6 years 前

已解决


Calculate cosine without cos(x)
Solve cos(x). The use of the function cos() and sin() is not allowed.

6 years 前

已解决


Check if a string starts with another string
Input s='He was so tired' q='He' Output ans = true

6 years 前

已解决


Calculate the sum of two polynomials
Calculate the sum of two polynomials if they are written in notation with their coefficients. example: a=[3 4 5]; b=[...

6 years 前

已解决


Energy-Mass Equivalence
Given input enegy of the object, E, and constant c = 300,000,000, find the mass of the object.

6 years 前

已解决


Rule of mixtures (composites) - lower bound
The <http://en.wikipedia.org/wiki/Rule_of_mixtures rule of mixtures> is used in the mechanical design of composite structures to...

6 years 前

已解决


Find the solution of algebraic equation
Find the solution of algebraic equation of the form an*x^n + a(n-1)*x^(n-1) + (an-2)*x^(n-2)+...... a2*x^2 + a1*x^1 + a0 = 0;...

6 years 前

已解决


Find the index of nth maximum of a row vector of real numbers
Given a vector of real numbers x, find the index idx of _n_ th maximum value. If nth maximum occurs more than once, return the i...

6 years 前

已解决


Counting the Grand Primes
A grand prime pair is a pair of primes, p1 and p2=p1+1000, such that both numbers are prime. Like a twin prime pair, where the d...

6 years 前

已解决


Eliminate Polysyllabics: Long live short words!
Given a string s1, return s2 in which all the words with more than one syllable have been removed. To make things simple, we ...

6 years 前

已解决


Find cosine between two given vectors u and v.
Find cosine between two given vectors u and v. Example u = [5 2 0 5 3 0]; v = [3 2 5 1 ...

6 years 前

已解决


Opposite task convert string hexadecimal numbers array into array of decimal numbers .
Opposite task convert string hexadecimal numbers array into array of decimal numbers . Example x=[ '208'; '209'; '20A'; ...

6 years 前

已解决


Solve the following system of equations.
x - 2y + 3z = a 2x + y + z = 4 -3x + 2y - 2z = -10

6 years 前

已解决


Analyze observation data
Suppose you have the following data (A,B,C) in three-column format. A B C -------------------------- t=1 ...

6 years 前

已解决


Divisible by 21
Write a function to determine if a number is divisible by 21.

6 years 前

已解决


Make visible max values
Make visible maximum values of rows input = [1 2 3 4 5; 6 9 8 2 1; 2 1 4 5 8; 1 9 7 9 2]; ...

6 years 前

已解决


Calculate the volume of the cube.
Example n = 3; a=volume(n); a = 27

6 years 前

已解决


Repeat string n times
* You will be provided a string (s = 'string1_') * a starting point (num1 = 6) (always bigger than or equal to zero) * and n (...

6 years 前

已解决


This is a palindrome and so am I
A palindrome is a sequence of characters which reads the same backward or forward, for instance 'a man a plan a canal panama'...

6 years 前

已解决


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

6 years 前

已解决


How many rectangles in a grid ?
How many rectangles are there in an m × n grid ? For example, if m=1 & n=2, we have 3 rectangles.

6 years 前

加载更多