解決済み


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

約7年 前

解決済み


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

約7年 前

解決済み


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

約7年 前

解決済み


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

約7年 前

解決済み


Simple equation: Annual salary
Given an hourly wage, compute an annual salary by multiplying the wage times 40 and times 50, because salary = wage x 40 hours/w...

約7年 前

解決済み


Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...

約7年 前

解決済み


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

約7年 前

解決済み


Tell me the slope
Tell me the slope, given a vector with horizontal run first and vertical rise next. Example input: x = [10 2];

約7年 前

解決済み


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

約7年 前

解決済み


Side of an equilateral triangle
If an equilateral triangle has area A, then what is the length of each of its sides, x? <<http://upload.wikimedia.org/wikipe...

約7年 前

解決済み


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<http://upload.wikimedia.org/wikipe...

約7年 前

解決済み


Is this triangle right-angled?
Given three positive numbers a, b, c, where c is the largest number, return *true* if the triangle with sides a, b and c is righ...

約7年 前

解決済み


Roll the Dice!
*Description* Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. *Example* [x1,x2] =...

約7年 前

解決済み


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

約7年 前

解決済み


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<http://upload.wikimedia.org/wikipedia/commons/e/e0/Equilateral-tr...

約7年 前

解決済み


Basics: counting digits of a number irrespective of the sign
publish the number of digits in any input integer example: -23---->2

約7年 前

解決済み


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

約7年 前

解決済み


Reverse the vector
Reverse the vector elements. Example: Input x = [1,2,3,4,5,6,7,8,9] Output y = [9,8,7,6,5,4,3,2,1]

約7年 前

解決済み


Select every other element of a vector
Write a function which returns every other element of the vector passed in. That is, it returns the all odd-numbered elements, s...

約7年 前

解決済み


Weighted average
Given two lists of numbers, determine the weighted average. Example [1 2 3] and [10 15 20] should result in 33.333...

約7年 前

解決済み


Square a Number
Given an input x, return y, which is equal to the square of x.

約7年 前

解決済み


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

約7年 前

解決済み


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

約7年 前

解決済み


Min of a Matrix
Return the minimum value in the given matrix.

約7年 前

解決済み


Factorial Numbers
Factorial is multiplication of integers. So factorial of 6 is 720 = 1 * 2 * 3 * 4* 5 *6 Thus 6 factorial = factorial(720)....

約7年 前

解決済み


Create a Standard Size Vector
Given an input x, create a row vector y from 1 to x with 5 elements.

約7年 前

解決済み


Basic Quadratic Equation
Create the equation: y=(3x)^2+(5x)+35 and compute y for various values of x

約7年 前

解決済み


Datetime basics
Generate the datetime scalar representing the current date

約7年 前

解決済み


The great 82-year-old
Let's answer the question below; 'I am *x* years old and I have never written programs. If I study from now, will I be able ...

約7年 前

解決済み


Speed of car travelling x meters in y seconds
What is the speed of a car if the car travelled x meters in y seconds? Supply the answer in m/s.

約7年 前

さらに読み込む