解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


Halder function
Find the halder function value of a number

3年以上 前

解決済み


Find out Harmonic mean.
Find out Harmonic mean.

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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

3年以上 前

解決済み


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.

3年以上 前

さらに読み込む