A résolu


String Manipulator
Write a script that takes a string as an input and returns a cell array containing – I. the count of vowels. II. Find the ind...

presque 4 ans il y a

A résolu


Weird Diagonal Matrix!!
**If you have loved the problem, please like it below(Request)** Given an integer n, create a matrix whose diagonal elements wi...

presque 4 ans il y a

A résolu


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] Output vector = [90 89 12 10 7 5 3 ...

presque 4 ans il y a

A résolu


Draw 'Y'
Draw 'Y' in an x-by-x matrix (where x is odd and x >= 3) Examples: x = 3 y = [1 0 1 0 1 0 0 1 0] x = 5 y = [1...

presque 4 ans il y a

A résolu


Given an input string, generate a variable name out of it
Given an input string, generate a variable name out of it in easy to read format by a programmer. If the input string contains ...

presque 4 ans il y a

A résolu


Draw a triangle of ones
For any given n, return a matrix that includes a triangle of ones of height n: Example n = 3 output = [0,0,1,0,0 ...

presque 4 ans il y a

A résolu


Area of a regular hexagon
Given the length of a side of a regular hexagon, return its area rounded to two decimal places.

presque 4 ans il y a

A résolu


string comparision
compare two strings if both are same return 1 else return 0

presque 4 ans il y a

A résolu


Draw a X
Given an input , create a square matrix of zeros with an X of ones. Ex. n = 3 drawX(3) [ 1 0 1 0 1 0 1 0 1 ] ...

presque 4 ans il y a

A résolu


Draw a x-by-x matrix British flag (Euro 2020)
Draw a x-by-x matrix 'British flag' using '0' and '1'.(x is odd and bigger than 4) x = 5 answer = [0 0 1 0 0 ...

presque 4 ans il y a

A résolu


Draw a x-by-x matrix 'Denmark flag'(Euro(2020)
Draw a x-by-x matrix 'Denmark flag' using '4' and '1'.(x is odd and bigger than 4) Number 4: Caption S.Kjær and number 1: K.S...

presque 4 ans il y a

A résolu


Draw a Diamond shape in ones Matrix with '0' s
Input will be odd numbers.The task is to make a Diamond shape in a ones matrix with '0's where the matrix will be a square matri...

presque 4 ans il y a

A résolu


Draw "C" in a zero matrix
Given a x-by-x matrix filled with zeros (x> 4). Use 1 to draw a letter C into it! Like this: x = 5, y = 1 1 1 1 1 1 0 0 0 1 ...

presque 4 ans il y a

A résolu


Draw "T" inside a Zero Matrix
Given a x-by-x matrix filled with zeros (x> 2). Use 1 to draw a letter "T" into it! Like this: x = 5, y = 1 1 1 1 1 0 0 1 0 0...

presque 4 ans il y a

A résolu


Bubble sort
Write your own bubble sort function ( <https://en.wikipedia.org/wiki/Bubble_sort>) to sort all elements in x in ascending order....

presque 4 ans il y a

A résolu


Determine whether the given number is palindrome or not.
A palindromic number (also known as a numeral palindrome or a numeric palindrome) is a number (such as 16461) that remains the s...

presque 4 ans il y a

A résolu


Choose group with people
How many ways can you choose n groups of n people from n^2 people, assuming the groups are distinct? The number of people is gi...

presque 4 ans il y a

A résolu


Altitude of locations on the earth
Find the altitude of a location on the earth, given latitude and longitude coordinates, above mean sea level. Input__________...

presque 4 ans il y a

A résolu


Cancel Middle
Write a function called cancel_middle that takes A, an n-by-m matrix, as an input where both n and m are odd numbers an...

presque 4 ans il y a

A résolu


Double Fibonacci
double_fibonacci takes two integers, each greater than one, as input arguments (it does not have to check the format of the inpu...

presque 4 ans il y a

A résolu


Nth Order Polynomial Regression
Inputs: -two vectors x and y (row or column) -order of polynomial, p Outputs: -vector of coefficients [b0 b...

presque 4 ans il y a

A résolu


Number of digits in an integer
Specifies how many digits in a given integer. Example: in=100 ==> out=3

presque 4 ans il y a

A résolu


Create a function that gives a matrix like the following
x=3 y= [1 -1 -1 0 1 -1 0 0 1]; -------------------------------- x=5 y= [ 1 -1 -...

presque 4 ans il y a

A résolu


Sequence
Let S be a sequence of numbers Let Find for some , where and .

presque 4 ans il y a

A résolu


Determine whether one vector is a subset of another
While bumbling through a pair of problems in the Number Theory group, I wrote code to determine whether a vector is a subset of ...

presque 4 ans il y a

A résolu


Find all prime factors of the input
Given an input x, find its all prime factors. Return the vector with all factors in ascending order. Efficiency is the key here...

presque 4 ans il y a

A résolu


Chain multiplication - 01
Say, you are given two matrices - A (shape= 3*4) and B(shape = 4*5). If you multiply these two matrices, the resultant matrix w...

presque 4 ans il y a

A résolu


Number of leaps in binary search
Binary search is one of the most popular searching algorithms (Binary Search Algorithm). It works only in a sorted array. It uti...

presque 4 ans il y a

A résolu


Cut the rod
A rod of length n can be cut in different sizes. Different price is associated with different length of cuts. length, len= [1,...

presque 4 ans il y a

A résolu


Sort Non-zeros
Consider 0s in a vector creates a break-point. sort all the sub-arrays created by those break points. For example, a = [3, 4, 1...

presque 4 ans il y a

Charger plus