解決済み


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

3ヶ月 前

解決済み


Set some matrix elements to zero
First get the maximum of each *row*, and afterwards set all the other elements to zero. For example, this matrix: 1 2 3 ...

3ヶ月 前

解決済み


Find Logic 15

3ヶ月 前

解決済み


First non-zero element in each column
For a given matrix, calculate the index of the first non-zero element in each column. Assuming a column with all elements zero i...

3ヶ月 前

解決済み


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

3ヶ月 前

解決済み


Matlab Basics II - squares
Write a function that takes matrix A, and squares each element in the matrix example: A = [1 2 3] output = [1 4 9]

3ヶ月 前

解決済み


Y=X
Given an input variable x, output a variable y that is equal in value to x. Example: Input x = 1 Output y is 1 Inp...

3ヶ月 前

解決済み


Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...

3ヶ月 前

解決済み


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

3ヶ月 前

解決済み


Convert given decimal number to binary number.
Convert given decimal number to binary number. Example x=10, then answer must be 1010.

3ヶ月 前

解決済み


Get all prime factors
List the prime factors for the input number, in decreasing order. List each factor. If the prime factor occurs twice, list it as...

3ヶ月 前

解決済み


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

3ヶ月 前

解決済み


Beginner's Problem - Squaring
Try out this test problem first. Given the variable x as your input, square it by two and put the result in y. Examples: ...

3ヶ月 前

解決済み


All your base are belong to us
Find the base _b_ logarithm of the input decimal number _x_. Express the output as a decimal number. The first argument is the n...

3ヶ月 前

解決済み


Roll the Dice!
Description Return two random integers between 1 and 6, inclusive, to simulate rolling 2 dice. Example [x1,x2] = rollDice(...

3ヶ月 前

解決済み


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

3ヶ月 前

解決済み


Find all elements less than 0 or greater than 10 and replace them with NaN
Given an input vector x, find all elements of x less than 0 or greater than 10 and replace them with NaN. Example: Input ...

3ヶ月 前

解決済み


Make a checkerboard matrix
Given an integer n, make an n-by-n matrix made up of alternating ones and zeros as shown below. The a(1,1) should be 1. Example...

3ヶ月 前

解決済み


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

3ヶ月 前

解決済み


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

3ヶ月 前

解決済み


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

3ヶ月 前

解決済み


Convert a numerical matrix into a cell array of strings
Given a numerical matrix, output a *cell array of string*. For example: if input = 1:3 output is {'1','2','3'} whic...

3ヶ月 前

解決済み


Calculate the area of a triangle between three points
Calculate the area of a triangle between three points: P1(X1,Y1) P2(X2,Y2) P3(X3,Y3) these three points are the vertices of ...

3ヶ月 前

解決済み


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

3ヶ月 前

解決済み


De-dupe
Remove all the redundant elements in a vector, but keep the first occurrence of each value in its original location. So if a =...

3ヶ月 前

解決済み


Energy Conversion 1

3ヶ月 前

解決済み


Temperature Conversion 3
Given a temperature in Celcius, convert it to Fahrenheit.

3ヶ月 前

解決済み


Temperature Conversion 2

3ヶ月 前

解決済み


Temperature Conversion 1

3ヶ月 前

解決済み


Total energy

3ヶ月 前

さらに読み込む