解決済み


Triangle Numbers
Triangle numbers are the sums of successive integers. So 6 is a triangle number because 6 = 1 + 2 + 3 which can be displa...

5年弱 前

解決済み


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

5年弱 前

解決済み


Determine whether a vector is monotonically increasing
Return true if the elements of the input vector increase monotonically (i.e. each element is larger than the previous). Return f...

5年弱 前

解決済み


sum of non-primes
The sum of the non-primes no larger than 10 is 1+4+6+8+9+10=38 Find the sum of all the positive non-prime integers that do no...

5年弱 前

解決済み


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

5年弱 前

解決済み


Area of a disk
Find the area of a disk or circle. x= radius of the disk.

5年弱 前

解決済み


Rotate Matrix @180 degree
Rotate Matrix @180 degree Example A=[8 1 6; 3 5 7; 4 9 2], then answer would be [2 9 4;...

5年弱 前

解決済み


Create incrementing array
Given a and b generate an output matrix as shown in following examples: a=2 b=5 output=[2 20 200 2000 20000] a=4 b...

5年弱 前

解決済み


factorial of a number x
Factorial of a number x

5年弱 前

解決済み


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

5年弱 前

解決済み


Create sequnce 1 4 9 16 25.........
Create sequnce 1 4 9 16 25......... upto entered input value using matlab scripting commands. Let y be output and x be input

5年弱 前

解決済み


Return the largest number that is adjacent to a zero
This example comes from Steve Eddins' blog: <http://blogs.mathworks.com/steve/2009/05/27/learning-lessons-from-a-one-liner/ Lear...

5年弱 前

解決済み


Sum the 'edge' values of a matrix
Sum the 'edge' values of an input matrix (the values along the perimeter). Example [1 2 3 4 5 6 7 8 9] Output = ...

5年弱 前

解決済み


Generate pi using logarithm
Generate pi using logarithm

5年弱 前

解決済み


Sum of the Multiplication of Vectors
Given the vectors x and y as input, multiply the vectors and return the summation of its elements. Example: x = [1 2 ...

5年弱 前

解決済み


matrix of natural number
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 resides seially as shown in the examples below. ...

5年弱 前

解決済み


Find the largest number
Given a vector v with 4 elements, find the largest number x. Example: Input: v = [4 7 1 6]; Output: x = 7; You mu...

5年弱 前

解決済み


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

5年弱 前

解決済み


Basic arrays operations.
Apply element-by-element binary operation 'fun' to two arrays (A and B).

5年弱 前

解決済み


ASCii Code
Using matlab, give the symbol that is associated with ASCii code 122

5年弱 前

解決済み


Count ones
Write a program to count number of ones (1s) in an integer variable input. For example: Input x=2200112231 output y=3 I...

5年弱 前

解決済み


Is the Point in a Triangle?
Check whether a point or multiple points is/are in a triangle with three corners Points = [x, y]; Triangle = [x1, y1; x...

5年弱 前

解決済み


Box!
Given a box, find the volume of the cube. With each side = a.

5年弱 前

解決済み


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.

5年弱 前

解決済み


BASICS - sum part of vector
Please make a function, where as input you get vector "x" and and vector "c", where in "c" vector you get indexes to sum. Examp...

5年弱 前

解決済み


If-then-else
Complete the function below such that if the value of x is in the range 10 to 14, inclusive, the value 18 is assigned to y. Oth...

5年弱 前

解決済み


select the primes of a vector
Find the prime numbers in a vector

5年弱 前

解決済み


Right Triangle Side Lengths (Inspired by Project Euler Problem 39)
If _p_ is the perimeter of a right angle triangle with integral length sides, { _a_, _b_, _c_ }, there are exactly three solutio...

5年弱 前

解決済み


Find my daddy long leg (No 's')
Given the ratio of the two legs (longer / shorter), and the hypotenuse length, find the value of the bigger leg.

5年弱 前

解決済み


Square the input
Given a scalar or vector x, return the square of each element. Example x = [7 2] answer = [49 4]

5年弱 前

さらに読み込む