Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


Halder function
Find the halder function value of a number

mehr als 3 Jahre vor

Gelöst


Find out Harmonic mean.
Find out Harmonic mean.

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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

mehr als 3 Jahre vor

Gelöst


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.

mehr als 3 Jahre vor

Mehr laden