解決済み


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

5年弱 前

解決済み


Making change
Given an amount of currency, return a vector of this form: [100 50 20 10 5 2 1 0.5 0.25 0.1 0.05 0.01] Example: Input a = ...

5年弱 前

解決済み


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

5年弱 前

解決済み


Balanced number
Given a positive integer find whether it is a balanced number. For a balanced number the sum of first half of digits is equal to...

5年弱 前

解決済み


Program an exclusive OR operation with logical operators
Program an exclusive or operation *without* using the MATLAB function xor. Use logical operators like |, &, ~, ... instead. ...

5年弱 前

解決済み


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for.

5年弱 前

解決済み


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

5年弱 前

解決済み


Colon operator of two vectors
You are given two vectors of equal length: VecStart, VecEnd Each vector contain a set of integers, where VecEnd(j)>=VecStar...

5年弱 前

解決済み


Make a Palindrome Number
Some numbers like 323 are palindromes. Other numbers like 124 are not. But look what happens when we add that number to a revers...

5年弱 前

解決済み


Divisors of an integer
Given a number N, return a vector V of all integers that divide N. For example, N = 10 Then V=[1 2 5 10]

5年弱 前

解決済み


Find out value of sine given by degree.
Find out value of sine given by degree. If theta=30, it's value must be 0.5.

5年弱 前

解決済み


Element by element multiplication of two vectors
Given two input vectors, return the element-by-element product. Example A = [1 2 3] B = [7 3 1] The answer should be...

5年弱 前

解決済み


Try and Catch Simple Example
Try and Catch Simple Example <http://in.mathworks.com/help/matlab/ref/try.html Example> Vector x=[1 4 6 8 10]; Create...

5年弱 前

解決済み


Find out total non zero element of matrix
Find out Non zero element of matrix A=magic(5) 17 24 1 8 15 23 5 7 14 16 4 6...

5年弱 前

解決済み


Calculate the number of elements in a matrix.
Calculate the number of elements in a matrix.

5年弱 前

解決済み


Determine the factorial of a number

5年弱 前

解決済み


Area of Ellipse

5年弱 前

解決済み


Area of a pentagon
Given the side of a regular pentagon and its apothem return the area of pentagon. Remember the area of pentagon is calculate ...

5年弱 前

解決済み


Make a vector of prime numbers
Input(n) - length of vector with prime numbers Output(v) - vector of prime numbers Example: * n=1; v=2 * n=3; v=[2 3 5...

5年弱 前

解決済み


Perimeters/Circumference
Given an array. Determine whether the perimeter is of a circle, triangle or square. Then calculate the perimeter.

5年弱 前

解決済み


Skip by a multiple
Given an integer create an array of its multiples. Array must have a length of 15

5年弱 前

解決済み


Product of Array
Given an array of numbers. Get the product of the array.

5年弱 前

解決済み


Remove the Zero
Given an array n, remove all zeros

5年弱 前

解決済み


Where is she?
Given the numbers 12, 3, 6, 9 Tell where the girl is located. That is: Look to your 3 o'clock = look right Example ...

5年弱 前

解決済み


Remove and Sort
Given a randomized array n, sort it and remove all odd integers. n=5 y = [2 4]

5年弱 前

解決済み


Is It a Palindrome?
Given a string or array, determine if it is a palindrome.

5年弱 前

解決済み


Kinetic Energy
Given the mass m and velocity v of an object, determine its <http://en.wikipedia.org/wiki/Kinetic_energy kinetic energy>.

5年弱 前

解決済み


surrounded matrix
With a given matrix A (size m x n) create a matrix B (size m+2 x n+2) so that the matrix A is surrounded by ones: A = [1 2 ...

5年弱 前

解決済み


Distance Between Points
Being n the number of points (If n = 3 there would be 3 points: A, B and C). The distance between each pair of points increases...

5年弱 前

解決済み


Find the area of ​​the square
There are *n²* circles inscribed in the square ABCD. The perimeter of each circle is *aπ* <<http://imgfz.com/i/3wzCeAT.png>> ...

5年弱 前

さらに読み込む