Resuelto


Element-wise vector product (★)
Given two vectors x and y, compute their element-wise product z. Thus, if x = [1 3 5] and y = [0.5 -1 2], then z = [1*0.5...

casi 4 años hace

Resuelto


Arrow!!
Write a script that gives (( follow the example)) if x=4 & output= 1 1 1 1 1 1 0 1 1...

casi 4 años hace

Resuelto


STOP that car!!!
The maximum allowed speed for this road is 100. Find the cars that didn't observe the speed limit Arrest and fine them!!!

casi 4 años hace

Resuelto


Check if sorted
Check if sorted. Example: Input x = [1 2 0] Output y is 0

casi 4 años hace

Resuelto


sum all digits
input = 123456789, output = 1+2+3+4+5+6+7+8+9 = 45

casi 4 años hace

Resuelto


Add 3 (x<=100) Or Subtract 100 and add 3(100<x)
Add 3 to every element. However, if the value is greater than 100, subtract 100 and add 3. eg. input x = [45 106; 67 1...

casi 4 años hace

Resuelto


true or false
if the matrix has a zero, return true. else, return false

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

casi 4 años hace

Resuelto


Reepeating numbers in array
Repeating numbers in array In = [1 0 0 0 2 0 0 0 3 0 0 0 0 0 5 0 0 0 0]. Out = [1 1 1 1 2 2 2 2 3 3 3 3 3 3 5 5 5 5 5].

casi 4 años hace

Resuelto


Counting candies
In a classroom of |'n'| children, every even numbered child gets one big candy and every odd numbered child gets two small candi...

casi 4 años hace

Resuelto


Append two matrix as shown below example
Append two matrix as shown below example A=[1 2; 3 4] and B=[5 6;7 8] Answer must be 1 2 5 6 3...

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


Is it prime?
Given a number, check whether it is prime or not. If prime output is true, otherwise false.

casi 4 años hace

Resuelto


Find the largest value in the 3D matrix
Given a 3D matrix A, find the largest value. Example >> A = 1:9; >> A = reshape(A,[3 1 3]); >> islargest(A) a...

casi 4 años hace

Resuelto


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

casi 4 años hace

Resuelto


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

casi 4 años hace

Resuelto


Halder function
Find the halder function value of a number

casi 4 años hace

Resuelto


Find out Harmonic mean.
Find out Harmonic mean.

casi 4 años hace

Resuelto


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

casi 4 años hace

Resuelto


Find the index of the largest value in any vector X=[4,3,4,5,9,12,0,4.....5]
The given function returns the index of the maximum value in a given matrix. such as X=[4,3,4,5,9,12,0,5] Ans= 6 if maxim...

casi 4 años hace

Resuelto


Palindrome Check
Check whether the entire matrix is palindrome or not. Example matrix = [7 8 7] matrix_reverse = [7 8 7] So the mat...

casi 4 años hace

Resuelto


the number of inputs
Find the number of the inputs of the function. example y = theinputnumber(x,k); function called theinputnumber has 2 in...

casi 4 años hace

Resuelto


Change the first and last diagonal element of the identity matrix to zero
Starting with the identity matrix, change first and last diagonal element to zero. Example If n=5 A = 0 0 ...

casi 4 años hace

Resuelto


Reshape a Vector
Write a function that accept three inputs. The first one is a row vector S. The second and third arguments are m and n which de...

casi 4 años hace

Resuelto


Decide whether determinant is zero.
Given a 3 x 3 matrix, find the determinant. Let y = true if the determinant is zero, and let y = false if the determinant is no...

casi 4 años hace

Resuelto


How many apples
You have x apples I take from you y apples now how many apples you have ?

casi 4 años hace

Resuelto


Find the area of the four walls
If length, breadth and height of the walls are given, find the area of the four walls.

casi 4 años hace

Resuelto


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.

casi 4 años hace

Cargar más