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