A résolu


Pattern Sum
Write a function which receives two single digit positive integers, (k and m) as parameters and calculates the total sum as: k...

environ 8 ans il y a

A résolu


Find if a given sentence is a palindrome
Given a string/character array, return true if the string is a palindrome else returns false. For example: sample_text =...

environ 8 ans il y a

A résolu


Find the repeating elements and repetitions of a row vector.
So let's say that x is a vector, for example, x = [4, 4, 5, 5, 5, 6, 7, 7,8, 8, 8, 8] Now we want to get the following two ve...

environ 8 ans il y a

A résolu


Besson Ranks
Return Besson Ranks. You can look at <https://www.sciencedirect.com/science/article/pii/0895717789903671 this article.> Besso...

environ 8 ans il y a

A résolu


Determine if input is a valid AHP evaluation matrix
Input is a matrix. Output is a true or false statement (1 or 0). Return true if input is a valid Analytic Hierarchy Process eval...

environ 8 ans il y a

A résolu


Volume of Spherical Shell
In three-dimensional space, a spherical shell can be constructed from two concentric spheres. Determine the volume of a spheric...

environ 8 ans il y a

A résolu


Calculating Ring Area
In two-dimensional space, a ring can be constructed by using two concentric circles. Determine the area of a ring which has r1 ...

environ 8 ans il y a

A résolu


Get a new matrix by mapping each element of an arbitrary-sized input matrix using lookup table
A is a matrix of any size and dimension. Each element of matrix A belongs to the set S of natural numbers up to N. B is a vector...

environ 8 ans il y a

A résolu


Please check if calorie intake is less than 300 kcal.
I like eating some puddings and some chocolate cookies around 3 o'clock. However, I care about calorie intake. Please check whe...

environ 8 ans il y a

A résolu


Find the starting index of a consecutive condition
Given a logical vector |v|, and a positive integer |n|, return the smallest index |i| that satisfies: all( v(i : i+n-1) ) =...

environ 8 ans il y a

A résolu


Capitilize the first letter of every word in a string
For a given input string, capitalize every letter at the beginning of a word, and transform the rest of the letters to lower-cas...

environ 8 ans il y a

A résolu


Please check the last row
We have data of matrix, that is input. That contains 2 or more rows and the last row should contain the average of each column,...

environ 8 ans il y a

A résolu


vector indexes for a matrix
Matlab allows us to use several indexing styles making code simpler and easier to read than using loops. Vectors can have ve...

environ 8 ans il y a

A résolu


'Determine if array of numbers is odd'
Return true if the input single number is odd. If the input is a vector, it will return a vector or array of logical values indi...

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


Shuffle
Shuffle a vector by breaking it up to segments of |n| elements, and rearranging them in a reversed order. For example, the ve...

environ 8 ans il y a

A résolu


Vector push
Append an element |x| to the end of the vector |v| and return both the extended vector and the new number of its elements. |x| c...

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


The proportion of NaN in the data
If NaN occupies less than half of the input data, return 1, otherwise return 0. eg. input x = [1 2 NaN ; 4 NaN 6] >>> out...

environ 8 ans il y a

A résolu


Separate even from odd numbers in a vector - with a loop
*Using a loop*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the end. T...

environ 8 ans il y a

A résolu


Separate even from odd numbers in a vector - without loops
*Without using loops*, rearrange a vector of integers such that the odd numbers appear at the beginning, and even numbers at the...

environ 8 ans il y a

A résolu


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

environ 8 ans il y a

A résolu


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x=[1 2 3 4 5 6 7 ...

environ 8 ans il y a

A résolu


How many unique Pythagorean triples?
For a given integer |n|, return all <https://en.wikipedia.org/wiki/Pythagorean_triple Pythagorean triples> that inlude numbers s...

plus de 8 ans il y a

A résolu


What is the next step in Conway's Life?
Given a matrix A that represents the state of <http://en.wikipedia.org/wiki/Conway's_Game_of_Life Conway's game of Life> at one ...

plus de 8 ans il y a

A résolu


The average of the second largest values
Given a matrix, find the average of the second largest values in each row. The same value does not exist on a row. Example: ...

plus de 8 ans il y a

A résolu


Friday or not
I love Friday. Please tell me whether the day is Friday. Dateformat is 'yyyy-mm-dd' or 'dd-mmm-yyyy' or 'mm/dd/yyyy'. Exa...

plus de 8 ans il y a

A résolu


Exponential decay
Many dynamic processes can be approximated as an exponential decay. This applies to radioactive decay, some chemical reactions, ...

plus de 8 ans il y a

A résolu


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

plus de 8 ans il y a

Charger plus