Gelöst


MATLAB Basic: rounding II
Do rounding nearest integer. Example: -8.8, answer -9 +8.1 answer 8 +8.50 answer 9

etwa 9 Jahre vor

Gelöst


MATLAB Basic: rounding
Do rounding near to zero Example: -8.8, answer -8 +8.1 answer 8

etwa 9 Jahre vor

Gelöst


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

etwa 9 Jahre vor

Gelöst


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

etwa 9 Jahre vor

Gelöst


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

etwa 9 Jahre vor

Gelöst


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

etwa 9 Jahre vor

Gelöst


the number of inputs
Find the number of the inputs of the function. example y = theinputnumber(x,k); function called theinputnumber has 2 in...

etwa 9 Jahre vor

Gelöst


Sum the squares of numbers from 1 to n
For a given value of n return the sum of square of numbers from 1 to n. Example For n = 2 then sum of squares = 5 (1^2 + ...

etwa 9 Jahre vor

Gelöst


Get all corner elements from a matrix where dimension of matrix is always equal to or greater than 2.
if a given matrix a = [1 2 3;4 5 6]; so answer is going to be [1 3;4 6]

etwa 9 Jahre vor

Gelöst


Can you reshape the matrix?
Given a matrix A, is it possible to reshape it into another matrix with the given number of rows?

etwa 9 Jahre vor

Gelöst


What's the missing interior angle?
I'm talking about polygons... The sum of the interior angles of a triangle is 180 degrees. The sum of the interior angles of a...

etwa 9 Jahre vor

Gelöst


Matrix of almost all zeros, except for main diagonal
Write a program to input an integer n and build a n-by-n matrix with the numbers 1,2,...,n on the main diagonal and zeros elsewh...

etwa 9 Jahre vor

Gelöst


Find elements of set A those are not in set B
Given two sets of data A and B. Find elements of A those are not in set B. ...

etwa 9 Jahre vor

Gelöst


multiple of nine?
Given a positive number n, return true if n is a multiple of 9 and false if not. Do not make the division and do not use functio...

etwa 9 Jahre vor

Gelöst


prime to each other
Given two integers n1, n2 greater than 1, find out if they have common divisors or are prime to each other. Return "true" if the...

etwa 9 Jahre vor

Gelöst


Step up
For given input array, output a array with all elements step up by two

etwa 9 Jahre vor

Gelöst


Average Grade
Given a 1x5 vector presents the grades of a student on five tests. Calculate the average grade of that student.

etwa 9 Jahre vor

Gelöst


Convert from integer to binary
if true % decimalToBinaryVector(x) end

etwa 9 Jahre vor

Gelöst


Spherical Volume
Calculate the volume of a sphere.

etwa 9 Jahre vor

Gelöst


Find the area of a triangle
Given a triangle with a base b and height h, return the triangle area.

etwa 9 Jahre vor

Gelöst


Find the nearest prime
Given a positive integer 'n', the task is to find a prime number greater than or equal to 'n'. Example 1 If given 'n' is ...

etwa 9 Jahre vor

Gelöst


Odd elimination
Inspired by Project Euler problem #539 You'll be given a vector from 1 to n; Going from left to right, remove the first n...

etwa 9 Jahre vor

Gelöst


Find the next square number
Given one or more integers n, find the next integer that is a square, for each of them. Example 1: n = 1; out = 4; ...

etwa 9 Jahre vor

Gelöst


Sorting integers by their digits (Level 1)
Given a vector, v, of positive integers, return a vector, w, by sorting v in ascending order, such that primary sorting is done ...

etwa 9 Jahre vor

Gelöst


Increasing sub-sequence (Level 1)
Given a vector, v, of real numbers, return a positive integer, n, representing the longest contiguous increasing sub-sequence co...

etwa 9 Jahre vor

Gelöst


Detect pair of equal values in a Matrix
A 2D matrix of 2 rows and N columns with random integer numbers. A = [3 1 2 4 6 6 7; 7 3 2 1 5 2 4] ...

etwa 9 Jahre vor

Gelöst


generate number in particular way
A = [1 5 2 7]; MAX = 10; generate a array Y = [1 2 2 2 2 2 3 3 4 4]; i.e. total eleme...

etwa 9 Jahre vor

Gelöst


Isothermal Expansion
Given the initial pressure and volume of an ideal gas, calculate the new volume, given the new pressure. Hint: <https://en.wi...

etwa 9 Jahre vor

Gelöst


Does this dress make me look fat
For the input string "Does xyz make me look fat" output the string "No, xyz does not make you look fat"

etwa 9 Jahre vor

Gelöst


Height of a right-angled triangle
Given numbers a, b and c, find the height of the right angled triangle with sides a and b and hypotenuse c, for the base c. If a...

etwa 9 Jahre vor

Mehr laden