解決済み


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年以上 前

解決済み


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年以上 前

解決済み


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年以上 前

解決済み


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

11年以上 前

解決済み


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年以上 前

解決済み


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年以上 前

解決済み


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年以上 前

解決済み


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年以上 前

解決済み


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年以上 前

解決済み


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年以上 前

解決済み


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年以上 前

解決済み


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年以上 前

解決済み


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

11年以上 前

解決済み


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年以上 前

解決済み


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年以上 前

解決済み


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

11年以上 前

解決済み


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年以上 前

解決済み


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

12年弱 前

解決済み


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

12年弱 前

解決済み


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

12年弱 前

解決済み


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.

12年弱 前

解決済み


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

12年弱 前

解決済み


Area of rhombus
Calculate the rhombus area

12年弱 前

解決済み


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

12年弱 前

解決済み


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

12年弱 前

解決済み


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

12年弱 前

解決済み


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

12年弱 前

解決済み


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

12年弱 前

解決済み


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

12年弱 前

解決済み


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

12年弱 前

さらに読み込む