解決済み


Create a Matrix of Zeros
Given an input x, create a square matrix y of zeros with x rows and x columns.

10年以上 前

解決済み


Square a Number
Given an input x, return y, which is equal to the square of x.

10年以上 前

解決済み


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

10年以上 前

解決済み


Find the Nth Root of a Given Number
Find the Nth root of a given number x. Examples x = 4096 n = 4 y = 8 x = 625 n = 5 y = 3.6239

10年以上 前

解決済み


Compute a dot product of two vectors x and y
x and y are input vectors, d is a number and contains their dot product

10年以上 前

解決済み


N-Cards Problem
You have a deck of _N_ cards numbered in order from 1 to _N_. You discard the top card (card 1) and place the next card (card 2)...

10年以上 前

解決済み


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

10年以上 前

解決済み


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

10年以上 前

解決済み


Method of Common Differences part-1
Use the method of common differences to output a vector containing the initial values and the nth order difference. ex ...

10年以上 前

解決済み


Is it a number?
Determine if input is numeric. If it is,output is 1; if it is not, output is 0.

10年以上 前

解決済み


Min of a Matrix
Return the minimum value in the given matrix.

10年以上 前

解決済み


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

10年以上 前

解決済み


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

10年以上 前

解決済み


Area of a circle
Find the value for area of the circle if diameter is given

10年以上 前

解決済み


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

10年以上 前

解決済み


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

10年以上 前

解決済み


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

10年以上 前

解決済み


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

10年以上 前

解決済み


The Hitchhiker's Guide to MATLAB
Output logical "true" if the input is the answer to life, the universe and everything. Otherwise, output logical "false".

10年以上 前

解決済み


Fahrenheit to Celsius using multiple statements
Given a Fahrenheit value F, convert to a Celsius value C. While the equation is C = 5/9 * (F - 32), as an exercise use two state...

10年以上 前

解決済み


Try 1.5.4: Celsius to Fahrenheit
Write a program to convert an input given in Celsius to Fahrenheit. Examples: Input celsiusValue = 100 Output fahrValu...

10年以上 前

解決済み


Bottles of beer
Given an input number representing the number of bottles of beer on the wall, output how many are left if you take one down and ...

10年以上 前

解決済み


Pizza value using expression with parentheses
Pizza prices are typically listed by diameter, rather than the more relevant feature of area. Compute a pizza's value (cost per ...

10年以上 前

解決済み


Distance walked 1D
Suppose you go from position 7 to 10 to 6 to 4. Then you have walked 9 units of distance, since 7 to 10 is 3 units, 10 to 6 is 4...

10年以上 前

解決済み


radius of a spherical planet
you just measured its surface area, that is the input.

10年以上 前

解決済み


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

10年以上 前

解決済み


Target sorting
Sort the given list of numbers |a| according to how far away each element is from the target value |t|. The result should return...

10年以上 前

解決済み


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

10年以上 前

解決済み


Is my wife right? Now with even more wrong husband
Again, as in "Is my wife right?" ( <http://www.mathworks.com/matlabcentral/cody/problems/149-is-my-wife-right> ), answer 'yes' r...

10年以上 前

解決済み


Circle area using pi
Given a circle's radius, compute the circle's area. Use the built-in mathematical constant pi.

10年以上 前

さらに読み込む