Sum of unique multiples of 3 and 5
If we list all the natural numbers up to 15 that are multiples of 3 or 5, we get 3, 5, 6, 9, 10, 12 and 15. The sum of these mul...
Pass the Threshold!!
Write a Matlab function that will take as input a matrix of arbitrary dimensions and a
scalar threshold value, and return a vec...
8年弱 前
解決済み
Transpose the Matrix
Transpose the given matrix, e.g. x=[a b;c d]
transpose of x = [a c;b d]
vectors counting by 5
Create a vector with numbers from x_min to x_max in increments of 5.
8年弱 前
解決済み
Where is the number that you want to find?
For a given matrix A, find where the input number x appears.
Do this task by returning the vector which contains the row and th...
8年弱 前
解決済み
Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not.
Give...
Reverse Concatenation
Suggest methods to form a Matrix after deleting one of the input's elements.
Input should be element's position and output shou...
Count me in
Count the number of occurrences of the second input in the first input
Ex.
x1 = 12344455511; x2 =2; output = 1
...
8年弱 前
解決済み
MPS to MPH
Given the speed in miles per second, find the speed in miles per hour.
8年弱 前
解決済み
Shift elements of vector left
Shift elements of vector to the left.
For ex. : Input_vec = [1 2 3 4 5]
Output_vec = [2 3 4 5 1]
8年弱 前
解決済み
true or false
if the matrix has a zero, return true. else, return false
8年弱 前
解決済み
Find the minimal value in N*N Matrix
Suppose that we have N by N matrix, we try to find the minimal value in that matrix.
examples:
Input A=[1 2 3 5 6;52 58 56 45...
8年弱 前
解決済み
row removal
Consider a matrix and remove the first row of the matrix.
8年弱 前
解決済み
Vector with a repeated entry
Create a row vector of length n, filled with 4's. For example, if n = 3,
output = [4 4 4]
Hint:
Search for the function...
8年弱 前
解決済み
ASCII code of a leter.
Given the letter, the output will show the corresponding ASCII code.