Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


Generate pi using logarithm
Generate pi using logarithm

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


Remove the Zero
Given an array n, remove all zeros

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


Negative Infinity
Round the given array a towards negative infinity.

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


Potential Energy
Calculate the potential energy of a rock.

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Risolto


ASCii Code
Using Matlab get the ASCii for '?'

quasi 9 anni fa

Risolto


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

quasi 9 anni fa

Carica altro