Solved


Solve t^(a*x^2+b*x+c)=s
Solve t^(a*x^2+b*x+c)=s. Return x vector as result. Example a=1, b=2, c=1, t=3, s=15. Result x(1)= 0.5700 x(2)=-2.5700 H...

meer dan 4 jaar ago

Solved


Determine given vector is even or odd
Find the numbers of the input vector is odd or even then replace even with 1 and odd with 0 Example x = [ 3 3 4 6 1] ...

meer dan 4 jaar ago

Solved


Logical array indexing - part 1
Given an array |A| of size |p x q| , return an array |Y| of the same size such that the following conditions are satisfied. (...

meer dan 4 jaar ago

Solved


Counting candies
In a classroom of |'n'| children, every even numbered child gets one big candy and every odd numbered child gets two small candi...

meer dan 4 jaar ago

Solved


Solve expression I
Solve expression (1+sin(x))/cos(x)+cos(x)/(1+sin(x)) for given vector x.

meer dan 4 jaar ago

Solved


Replace x value into y value in string text.
Replace x value into y value in string text. Example text='Hello World' x='World', y='Universe' result='Hello Universe'.

meer dan 4 jaar ago

Solved


The great 82-year-old
Let's answer the question below; 'I am *x* years old and I have never written programs. If I study from now, will I be able ...

meer dan 4 jaar ago

Solved


determine amount cookies left
started with 3 cookies and you never ate any how many are left

meer dan 4 jaar ago

Solved


Temperature question
get the temperature...in celcius

meer dan 4 jaar ago

Solved


Calculate the CIRCUMFERENCE of circle.
Given the radius is 2, the circumference will be 12.5663.

meer dan 4 jaar ago

Solved


surface areas of a cylinder
There are 3 inputs: option, radius and height. If option= '1', compute the lateral surface area of the cylinder, for option 2 ca...

meer dan 4 jaar ago

Solved


Calculating the total earnings of a factory
The row vector, prods contains the number of various products manufactured per hour. The second row vector, prices holds values ...

meer dan 4 jaar ago

Solved


Sort the vector with the given index
Given x = [1 2 4 8 17] and t = [1 3 2 5 4] then y = [1 4 2 17 8].

meer dan 4 jaar ago

Solved


Determine if given number is perfect
A number is <http://en.wikipedia.org/wiki/Perfect_number perfect> if it is equal to the sum of its factors, excluding itself. ...

meer dan 4 jaar ago

Solved


Sum of logarithms
Given a vector, v, of real positive numbers, compute the sum, s, of the base-10 logarithms of the elements of v, without the use...

meer dan 4 jaar ago

Solved


Indexed Probability Table
This question was inspired by a Stack Overflow question forwarded to me by Matt Simoneau. Given a vector x, make an indexed pro...

meer dan 4 jaar ago

Solved


Tax Season ! How much is my salary?
Tax Season! I was employed for a period from x until y in a year and I get pay check of amount z on every alternate Friday of th...

meer dan 4 jaar ago

Solved


Flag largest magnitude swings as they occur
You have a phenomenon that produces strictly positive or negative results. delta = [1 -3 4 2 -1 6 -2 -7]; Marching thr...

meer dan 4 jaar ago

Solved


collision
several cars (n) were involved in this collision, the input matrix (vm) has n rows and two columns, first column for velocity an...

meer dan 4 jaar ago

Solved


Vector LCM
* Find Least Common Multiple of a given vector. * Need general solution as the test suite will be expanded. * Function Templa...

meer dan 4 jaar ago

Solved


Cumulative difference
Given an array, return the cumulative difference. Example a = [ 1 3 5 7 ] cumdiff = [ 1 2 1 -2 ]

meer dan 4 jaar ago

Solved


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

meer dan 4 jaar ago

Solved


Let's get back to school: create mixed numbered fraction
A fractional number can be represented as mixed number. A "mixed number" consists of an integer followed by a proper fraction...

meer dan 4 jaar ago

Solved


Who is the baby and who is the daddy in this family?
Given an array of numbers that shows the characteristcs of all family members, find who is the baby and who is daddy in this fam...

meer dan 4 jaar ago

Solved


Find the maximum two numbers of every column of a matrix
Find the maximum two numbers of every column of a matrix. Example: If we input a matrix A = [ 1 2 4 6 0 3 ...

meer dan 4 jaar ago

Solved


User defined nextpow function
Create a function which will take 2 arguments as n and x, and return y, where, n^y >= abs(x). [ Similar to builtin "nextpow2" fu...

meer dan 4 jaar ago

Solved


Create a matrix with difference of each row of input matrix
With a given input matrix A, create a output matrix B in such a way that each row in B is a difference of rows of input matrix A...

meer dan 4 jaar ago

Solved


Create a v-notch vector without "sort" function
Given a vector vec, create a v-shaped vector as shown below: vec = [ 10 2 3 89 5 7 90 0 12] ...

meer dan 4 jaar ago

Solved


Write c^3 as sum of two squares a^2+b^2
write c^3 as sum of two squares a^2+b^2. a and b must be integer and greater than zero. For example 5^3 = 2^2 + 11^2 5...

meer dan 4 jaar ago

Solved


How to subtract?
*&plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn &plusmn* * Imagine you need to subtract one...

meer dan 4 jaar ago

Load more