解決済み


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

8年以上 前

解決済み


random picture with random colours
write a function which creates a random(x,y) matrix with random RGB colours for example create_pic(5,5) gives us a 3d matrix. ...

8年以上 前

解決済み


Matlab Basics - Rounding III
Write a script to round a large number to the nearest 10,000 e.g. x = 12,358,466,243 --> y = 12,358,470,000

8年以上 前

解決済み


Binary Coder
Take an input number and print the binary value of this number.

8年以上 前

解決済み


Test if two numbers have the same digits
Given two integers _x1_ and _x2_, return |true| if the numbers written with no leading zeros contain the same digits. That is, t...

8年以上 前

解決済み


Sudoku square
We have a small Sudoku square, but one number is missing. x = [ 1 5 4 8 6 3 0 9 7 ] Make a function, wher...

8年以上 前

解決済み


Array of Ones
Create a 100 X 100 array of ones.

8年以上 前

解決済み


Generate pi using logarithm
Generate pi using logarithm

8年以上 前

解決済み


Matlab Basics - Set unwanted parts of a vector to zero
Consider a vector x, of length >= 7, write a script to set elements 2, 5, and 6 to zero. Example x = [1 2 3 4 5 6 7] --> ...

8年以上 前

解決済み


Sum of odd numbers in a matrix
Find the sum of all the odd numbers in a matrix. Example x = [2 3 5 7 1 4 11] y = 27

8年以上 前

解決済み


Finding perimeter of a rectangle
A rectangle has a length of x centimeters and a width of w centimeters. Find the perimeter.

8年以上 前

解決済み


Remove the Zero
Given an array n, remove all zeros

8年以上 前

解決済み


Matlab Basics II - Count rows in a matrix
Write a function that returns that number of rows in a vector or matrix x example: x = [1; 2; 3] output = 3

8年以上 前

解決済み


Negative Infinity
Round the given array a towards negative infinity.

8年以上 前

解決済み


Find out sum of all elements of given Matrix
Find out sum of all elements of given Matrix A=[1 2 3;4 5 6 ;7 8 9]; Answer must be: 45 *If you like this problem, pl...

8年以上 前

解決済み


Duplicate a character
Duplicate a character 'n' times. Example 1: str='a' n=5 output='aaaaa' Example 2: str='*' n=3 output='***'

8年以上 前

解決済み


Convert yards to feet
The goal of this script is to convert a value given in yards to feet.

8年以上 前

解決済み


What is Sum Of all elements of Matrix
Given the matrix x, return the sum of all elements of matrix. Example: Input x = [ 1 2 0 0 0 0 6 9 3 3 ] ...

8年以上 前

解決済み


Back to basics - mean of corner elements of a matrix
Calculate the mean of corner elements of a matrix. e.g. a=[1 2 3; 4 5 6; 7 8 9;] Mean = (1+3+7+9)/4 = 5

8年以上 前

解決済み


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

8年以上 前

解決済み


Sophie Germain prime
In number theory, a prime number p is a *Sophie Germain prime* if 2p + 1 is also prime. For example, 23 is a Sophie Germain prim...

8年以上 前

解決済み


Create a vector
Create a vector from 0 to n by intervals of 2.

8年以上 前

解決済み


Perfect Square or not
find Given input x is perfect square or not,if yes then output y=1.else y=0

8年以上 前

解決済み


reverse string
input='rama' output='amar'

8年以上 前

解決済み


Potential Energy
Calculate the potential energy of a rock.

8年以上 前

解決済み


Volume of this donut
Given hole diameter a, and outermost diameter b, determine the volume y of the resulting donut.

8年以上 前

解決済み


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

8年以上 前

解決済み


Unit Matrix
Given n, you should return an n-by-n unit matrix. Example: If input is n=2 then A = [ 1 0 0 1 ] If input ...

8年以上 前

解決済み


ASCii Code
Using Matlab get the ASCii for '?'

8年以上 前

解決済み


Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...

8年以上 前

さらに読み込む