Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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.

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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]

quasi 5 anni fa

Risolto


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.

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


Determine the factorial of a number

quasi 5 anni fa

Risolto


Area of Ellipse

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


Remove the Zero
Given an array n, remove all zeros

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Risolto


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

quasi 5 anni fa

Carica altro