Community Profile

photo

nadhirahjasri


2017 年からアクティブ

統計

  • Commenter
  • Solver

バッジを表示

Content Feed

表示方法

解決済み


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

約6年 前

解決済み


Finding Perfect Squares
Given a vector of numbers, return true if one of the numbers is a square of one of the other numbers. Otherwise return false. E...

約6年 前

解決済み


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

約6年 前

解決済み


Find the numeric mean of the prime numbers in a matrix.
There will always be at least one prime in the matrix. Example: Input in = [ 8 3 5 9 ] Output out is 4...

約6年 前

解決済み


Fibonacci sequence
Calculate the nth Fibonacci number. Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... Examples: Inpu...

約6年 前

解決済み


Bullseye Matrix
Given n (always odd), return output a that has concentric rings of the numbers 1 through (n+1)/2 around the center point. Exampl...

約6年 前

解決済み


Back and Forth Rows
Given a number n, create an n-by-n matrix in which the integers from 1 to n^2 wind back and forth along the rows as shown in the...

約6年 前

解決済み


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

約6年 前

解決済み


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

約6年 前

解決済み


Create times-tables
At one time or another, we all had to memorize boring times tables. 5 times 5 is 25. 5 times 6 is 30. 12 times 12 is way more th...

約6年 前

解決済み


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

6年以上 前

解決済み


Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody. Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...

6年以上 前

解決済み


Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5

6年以上 前

解決済み


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

6年以上 前

解決済み


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

6年以上 前

解決済み


Multiply by 3
Given the variable x as your input, multiply it by three and put the result in y.

6年以上 前

解決済み


multiply by three
Given the variable x as your input, multiply it by 3 and put the result equal to y. Examples: Input x = 2 Output y is ...

6年以上 前

解決済み


Area of a circle
Given the radius x, y would be the area of a circle. Pi = 3.1416

6年以上 前

解決済み


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

6年以上 前

解決済み


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

6年以上 前

解決済み


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

6年以上 前

解決済み


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

6年以上 前

解決済み


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

6年以上 前

解決済み


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

6年以上 前

解決済み


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

6年以上 前

解決済み


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

6年以上 前

解決済み


Times 2 - START HERE
Try out this test problem first. Given the variable x as your input, multiply it by two and put the result in y. Examples:...

6年以上 前

解決済み


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

6年以上 前