Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

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

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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


Halder function
Find the halder function value of a number

oltre 3 anni fa

Risolto


Find out Harmonic mean.
Find out Harmonic mean.

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

oltre 3 anni fa

Risolto


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

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

oltre 3 anni fa

Carica altro