Solved


Average valid values of arrays
Given a 1D array (column or row vector), compute the average of valid values. Valid values are defined via two thresholds: minVa...

11 years ago

Solved


THE CALCULATOR OF LOVE
In honor of Valentine's Day, program a love calculator that figures out the percentage of compatibility between two people using...

11 years ago

Solved


Find the elements of a matrix according to a defined property.
From A = [5,2,3] and B = [1,2,3,4,5,6,7,8,9,10] produce a vector C where : C(1) is the sum of the first A(1) elements of B, ...

11 years ago

Solved


Square a Number
Given an input x, return y, which is equal to the square of x.

11 years ago

Solved


Calculate Alcohol By Volume with Original and Final Gravity
Given an initial gravity of un-fermented wort (OG) and a final gravity of fermented wort (FG), better known as beer, it is possi...

11 years ago

Solved


A matrix of introverts
You are given a matrix full of numbers who happen to be very shy. Write a MATLAB function that will put a square of zeros aroun...

11 years ago

Solved


Number of vertices of a hypercube
Return the number of vertices of a n-dimensional hypercube.

11 years ago

Solved


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

11 years ago

Solved


Another colon problem
This is simple problem based on problems 555, 801, 1118, etc. Create an index vector from two input vectors. Example: ...

11 years ago

Solved


Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

11 years ago

Solved


Sort an array of structures
You need to sort an array of structures based upon *a numeric first field*: For example : a.n=1; a.name='a'; b.n=3...

11 years ago

Solved


Parse string and identify specific string sequence in algebraic equation
Given a string S that defines an algebraic expression such as: S= 'X= A1 + A2*(Y1 + A3*Y3)*exp( A4*Y12 + Y1) ;' return a...

11 years ago

Solved


Clock Hand Angle 1
Given a time in HH:MM:SS, find the smallest angle (in degrees) between the hour and minute hand

11 years ago

Solved


Find the biggest digit in a matrix
Write a function to find the biggest digit in a matrix; input -> a matrix output -> a digit For example; [12; 47;...

11 years ago

Solved


counting groups!
This problem is about counting groups. Example If you have x: x = [0.8 0.8 0.8 0.3 0.3 0.4 0.5 0.6 0.6 0.9] then a...

11 years ago

Solved


Hydrogens in a Saturated Hydrocarbon
Given (c) carbon atoms in a saturated hydrocarbon molecule (all single bonds), how many hydrogen atoms (h) are in the molecule?

11 years ago

Solved


Speed of light:Experiment
in 1849, Fizeau set up an experiment to measure the speed of light. The discription of this experiment can be found on wikipedi...

11 years ago

Solved


Transposition as a CIPHER
This all about transcripting a text message. If the input string is: *s1 = 'My name is Sourav Mondal'*, then the output is: *s2...

11 years ago

Solved


Elapsed time is -0.005204 seconds.
Write a function that takes less than zero seconds to execute, as measured using tic and toc. For repeatability, the test case p...

11 years ago

Solved


Return fibonacci sequence do not use loop and condition version 3
Calculate the nth Fibonacci number,return sequence Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... ...

11 years ago

Solved


Sum of series VI
What is the sum of the following sequence: Σk⋅k! for k=1...n for different n?

11 years ago

Solved


Natural numbers in string form
Create a cell array of strings containing the first n natural numbers. _Slightly_ harder than it seems like it should be. Ex...

11 years ago

Solved


A matrix of extroverts
Now that the introverts have had their script, the extroverts spoke up (naturally!) and demanded one as well. You will be given...

11 years ago

Solved


ranch area?
Your friend has a ranch with four distinct boundary lines. Three boundary lines are ideal straight roads: (1) North Club Road, (...

11 years ago

Solved


Perfect Square
Find a function that finds the root of a perfect number!

11 years ago

Solved


Small Riddle
Mr. Smith has two children. If the older child is a boy, what are the odds that the other child is also a boy?

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

11 years ago

Solved


Combinations without using nchoosek
You have to generate a matrix with all possible combinations of n elements *taken 2* at a time, *without using nchoosek(1:n,2)* ...

11 years ago

Solved


Tridiagonal
Return an n-by-n matrix that has a, b, c as the subdiagonal, main diagonal, and superdiagonal entries in the matrix. Example ...

11 years ago

Solved


Find the maximum number of decimal places in a set of numbers
Given a vector or matrix of values, calculate the maximum number of decimal places within the input. Trailing zeros do not coun...

11 years ago

Load more