문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

문제를 풀었습니다


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

3년 초과 전

더 보기