已解决


Return the first and last characters of a character array
Return the first and last character of a string, concatenated together. If there is only one character in the string, the functi...

28 days 前

已解决


Return area of square
Side of square=input=a Area=output=b

28 days 前

已解决


Calculate BMI
Given a matrix hw (height and weight) with two columns, calculate BMI using these formulas: 1 kilogram = 2.2 pounds 1 inch = 2...

28 days 前

已解决


Matlab Basics - Absolute Value
Write a script that returns the absolute value of the elements in x e.g. x = [-1 -2 -3 -4] --> y = [1 2 3 4]

28 days 前

已解决


Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns. E...

28 days 前

已解决


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

28 days 前

已解决


Convert from Fahrenheit to Celsius
Given an input vector F containing temperature values in Fahrenheit, return an output vector C that contains the values in Celsi...

28 days 前

已解决


only input
Return the output without writing any code into the function.

28 days 前

已解决


Cell Counting: How Many Draws?
You are given a cell array containing information about a number of soccer games. Each cell contains one of the following: * ...

28 days 前

已解决


y equals x divided by 2
function y = x/2

28 days 前

已解决


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...

28 days 前

已解决


Who has power to do everything in this world?
There is only one person who is older than this universe. He is Indian version of Chuck Norris.

28 days 前

已解决


Do you like your boss?
Do you like your boss? Answer can be any string! For example: Boss = 'Do you like your boss?'; Output = 'yes' or ...

28 days 前

已解决


Convert radians to degrees
Given input in radians, output to degrees

28 days 前

已解决


Sort a list of complex numbers based on far they are from the origin.
Given a list of complex numbers z, return a list zSorted such that the numbers that are farthest from the origin (0+0i) appear f...

28 days 前

已解决


Sum of series II
What is the sum of the following sequence: Σ(2k-1)^2 for k=1...n for different n?

28 days 前

已解决


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

28 days 前

已解决


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

28 days 前

已解决


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

28 days 前

已解决


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

28 days 前

已解决


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

28 days 前

已解决


Make the vector [1 2 3 4 5 6 7 8 9 10]
In MATLAB, you create a vector by enclosing the elements in square brackets like so: x = [1 2 3 4] Commas are optional, s...

28 days 前

已解决


Is my wife right?
Regardless of input, output the string 'yes'.

28 days 前

已解决


Add two numbers
Given a and b, return the sum a+b in c.

28 days 前

已解决


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are arranged in a spiral, the prime numbers contained in it form a sur...

28 days 前

已解决


Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice. Ex...

28 days 前

已解决


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

28 days 前

已解决


Fahrenheit to Celsius converter
Convert Fahrenheit to Celsius degrees.

28 days 前

已解决


Anyone for tennis? Your chances of winning a tie-break game
Imagine you are playing tennis and the score has reached 'six games all' in a Tie-break Set, so therefore the next game shall be...

28 days 前

已解决


Pizza!
Given a circular pizza with radius z and thickness a, return the pizza's volume. [ z is first input argument.] Non-scored bonus...

28 days 前

加载更多