Gelöst


cross in array
Make a cross from "1" in odd size array. Other value from array should be equal to "0"; As input you get length of side of arra...

mehr als ein Jahr vor

Gelöst


angle in regular polygon
Make a function which returns measure of interior angle in x-side regular polygon. x is as input. Please pay attention, that 1 ...

mehr als ein Jahr vor

Gelöst


Basic commands - rounding
make a function which will round to integer, which is nearer to zero. Example x=[-2.5 2]; y=[-2 2];

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


Interior angles
Find the sum of interior angles for polygon of x sides.

mehr als ein Jahr vor

Gelöst


prime test 2
enter the only non prime,non composite number

mehr als ein Jahr 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.

mehr als ein Jahr vor

Gelöst


Create a square matrix of zeros of even order
Create a square matrix of zeros of even order

mehr als ein Jahr vor

Gelöst


calculate the tangent of angle in radians
Calculate the tangent of angle in degrees

mehr als ein Jahr vor

Gelöst


Travel time
Calculate the time (in hours) it takes a car traveling at a given uniform speed of s km/hour to travel a distance of d km. For i...

mehr als ein Jahr vor

Gelöst


Function substitution (2)
Evaluate the function for the given values of the variables N and t

mehr als ein Jahr vor

Gelöst


Function substitution (1)
Evaluate the function for the given values of the variables N and t

mehr als ein Jahr vor

Gelöst


Array Concatenation (2)
Given two matrices, a and b, concatenate the two matrices vertically, i.e., the number of rows of the result should be equal to ...

mehr als ein Jahr vor

Gelöst


Mathematical formula
Find the value of the expression given the values of variables t and k. Assume g=9.81

mehr als ein Jahr vor

Gelöst


Array Concatenation (1)
Given two matrices, a and b, concatenate the two matrices horizontally, i.e., the number of columns of the result should be equa...

mehr als ein Jahr vor

Gelöst


High school cafeteria
Given an input vector of positive integers, return a row vector with the primes first (in increasing order) and the composites n...

mehr als ein Jahr vor

Gelöst


Volume of a sphere given its surface area
You just measured its surface area, that is the input.

mehr als ein Jahr vor

Gelöst


Palindrome Checker
Check to see if a given string is a palindrome (a word, phrase, or sequence that reads the same backward as forward). Output sh...

mehr als ein Jahr vor

Gelöst


Convert RGB to Grayscale
Convert a 3 element RGB array to its correspoding grayscale pixel (a scalar) *Hint: a formula exists!

mehr als ein Jahr vor

Gelöst


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

mehr als ein Jahr vor

Gelöst


Specific Element Count
Given a vector _v_ and a element _e_, return the number of occurrences of _e_ in _v_. Note: NaNs are equal and there may be n...

mehr als ein Jahr vor

Gelöst


Relative ratio of "1" in binary number
Input(n) is positive integer number Output(r) is (number of "1" in binary input) / (number of bits). Example: * n=0; r=...

mehr als ein Jahr vor

Gelöst


Converting binary to decimals
Convert binary to decimals. Example: 010111 = 23. 110000 = 48.

mehr als ein Jahr vor

Gelöst


Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...

mehr als ein Jahr vor

Gelöst


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

mehr als ein Jahr vor

Gelöst


Back to basics 14 - Keywords
Covering some basic topics I haven't seen elsewhere on Cody. Return a cell array of all MATLAB keywords

mehr als ein Jahr vor

Gelöst


Get the elements of diagonal and antidiagonal for any m-by-n matrix
In the problem <http://www.mathworks.com/matlabcentral/cody/problems/858-permute-diagonal-and-antidiagonal Problem 858. Permute ...

mehr als ein Jahr vor

Gelöst


Return unique values without sorting
If the input vector A is [42 1 1], the output value B must be the unique values [42 1] The values of B are in the same order a...

mehr als ein Jahr vor

Gelöst


Project Euler: Problem 5, Smallest multiple
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder. What is the smalle...

mehr als ein Jahr vor

Gelöst


Project Euler: Problem 7, Nth prime
By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13, we can see that the 6th prime is 13. What is the Nth prime numb...

mehr als ein Jahr vor

Mehr laden