已解决


Cell joiner
You are given a cell array of strings and a string delimiter. You need to produce one string which is composed of each string fr...

11 years 前

已解决


Find the alphabetic word product
If the input string s is a word like 'hello', then the output word product p is a number based on the correspondence a=1, b=2, ....

11 years 前

已解决


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

11 years 前

已解决


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

11 years 前

已解决


Who knows the last digit of pi?
There is only one man who knows the last digit of pi, who is that man? Give the name of that man, who, by popular believe, can ...

11 years 前

已解决


Binary numbers
Given a positive, scalar integer n, create a (2^n)-by-n double-precision matrix containing the binary numbers from 0 through 2^n...

11 years 前

已解决


How to find the position of an element in a vector without using the find function
Write a function posX=findPosition(x,y) where x is a vector and y is the number that you are searching for. Examples: fin...

11 years 前

已解决


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

11 years 前

已解决


Who Has the Most Change?
You have a matrix for which each row is a person and the columns represent the number of quarters, nickels, dimes, and pennies t...

11 years 前

已解决


Most nonzero elements in row
Given the matrix a, return the index r of the row with the most nonzero elements. Assume there will always be exactly one row th...

11 years 前

已解决


Implement simple rotation cypher
If given a letter from the set: [abc...xyz] and a shift, implement a shift cypher. Example: 'abc' with a shi...

11 years 前

已解决


square a vector-Given the variable x as your input, square it and put the result in y.
function y = (x)squared y = x; end

11 years 前

已解决


Count photos
Given n people, everyone must have pictures taken with everyone, each photo includes only two persons, please count the total nu...

11 years 前

已解决


Replace values under a limit
For a vector x and number n, the goal is to find every element of x inferior to n and replace it by n. Example x= [ 1 2 3...

11 years 前

已解决


Lightning strike distance: Writing a function
Write a function named LightningDistance that outputs "distance" given input "seconds". Seconds is the time from seeing lightnin...

11 years 前

已解决


Rotate a Matrix
Input a Matrix x, Output y is the matrix rotating x 90 degrees clockwise

11 years 前

已解决


Arrange vector in ascending order
Arrange a given vector in ascending order. input = [4 5 1 2 9]; output = [1 2 4 5 9];

11 years 前

已解决


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<http://upload....

11 years 前

已解决


Volume of a box
Given a box with a length a, width b, and height c. Solve the volume of the box.

11 years 前

已解决


Divide by 4
Given the variable x as your input, divide it by four and put the result in y.

11 years 前

已解决


Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

11 years 前

已解决


Area of a Square
Inside a square is a circle with radius r. What is the area of the square?

11 years 前

已解决


Area of rhombus
Calculate the rhombus area

11 years 前

已解决


Area of a triangle
A triangle is given with base *'b'* ,vertical hight *'h'* . then find it's area.

11 years 前

已解决


Find nearest prime number less than input number
Find nearest prime number less than input number . For example: if the input number is 125, then the nearest prime number whi...

11 years 前

已解决


First N Perfect Squares
*Description* Return the first N perfect squares *Example* input = 4; output = [ 1 4 9 16 ];

11 years 前

已解决


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

11 years 前

已解决


Factorial !
Calculate the factorial of a non-negative integer without using the built in function *factorial*

11 years 前

已解决


Is the input divisible by 3?
Return true if the input is divisible by 3 and false if not.

11 years 前

已解决


Find the hypotenuse
Given a and b (the two sides of a right-triangle), find c, the hypotenuse.

11 years 前

加载更多