Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


Generate pi using logarithm
Generate pi using logarithm

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


Remove the Zero
Given an array n, remove all zeros

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


Negative Infinity
Round the given array a towards negative infinity.

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


Potential Energy
Calculate the potential energy of a rock.

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


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

más de 8 años hace

Resuelto


ASCii Code
Using Matlab get the ASCii for '?'

más de 8 años hace

Resuelto


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

más de 8 años hace

Cargar más