Gelöst


Vector of digits (★★)
Given a positive integer x, construct a vector y with all the digits of x in the order of appearance in x. Thus, if x = 172...

mehr als 3 Jahre vor

Gelöst


Matrix multiplication
Multiply two incoming matrices via matrix multiplication

mehr als 3 Jahre vor

Gelöst


Sum of elements in a vector (★)
(copy of Prob. 3) Find the sum of all the numbers of the input vector x. Input x = [1 2 3 5] Output y is 11 <> ...

mehr als 3 Jahre vor

Gelöst


Vector raised to a power, element-wise (★)
Given a vector A and a number x, raise each element of the vector to the power of x. Thus, if A = [2 5 7 1] and x = 0.5, then ...

mehr als 3 Jahre vor

Gelöst


Create a vector with n repeated values of a number x (★★)
If x=3 and n=7 then the vector y would be y=[3 3 3 3 3 3 3]

mehr als 3 Jahre vor

Gelöst


Volume of Cylinder
Find the volume of a cylinder

mehr als 3 Jahre vor

Gelöst


Vector Element Multiplication
Take two incoming vectors, and output the element wise multiplication of the vectors.

mehr als 3 Jahre vor

Gelöst


Factorize uniquely! (★★)

mehr als 3 Jahre vor

Gelöst


Hard limit function
Classify x data as if x>=0 then y=1 if x<0 then y=0 Example x = [ -2 -1 0 1 2] y = [ 0 0 1 1 1]

mehr als 3 Jahre vor

Gelöst


Replicate elements in vectors (★★★)
(copy of Prob 867) Replicate each element of a row vector (with NaN) a constant number of times. Examples n=2, A=[1 2...

mehr als 3 Jahre vor

Gelöst


Function 1 (★)
Compute the value of <<https://i.imgur.com/AxKWLmE.gif>> for any given positive x.

mehr als 3 Jahre vor

Gelöst


area of a sphere

mehr als 3 Jahre vor

Gelöst


find the roots of a quadratic equation
for e.g x = [ 2 -1 -3] y = [1.5 -1]

mehr als 3 Jahre vor

Gelöst


Back to basics 5 - Clipboard
Covering some basic topics I haven't seen elsewhere on Cody. Copy the input string to the clipboard

mehr als 3 Jahre vor

Gelöst


Calculate distance travelled when given radius and rotations
When given radius of wheel and number of rotations calculate total distance travelled consider pi=3.14

mehr als 3 Jahre vor

Gelöst


Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody. Return the number of punctuation characters in the input variabl...

mehr als 3 Jahre vor

Gelöst


Will there be a new leader?
Simply answer the title.

mehr als 3 Jahre vor

Gelöst


Flipping
Write code that can reverse the vector without using any sort of loop. Example Given the input vector A = [ 1 2 3 4 5...

mehr als 3 Jahre vor

Gelöst


Approximate the cosine function
Without using MATLAB trigonometric functions, calculate the cosine of an argument x to a precision of 0.0001 Hint: You may wish...

mehr als 3 Jahre vor

Gelöst


Pernicious Anniversary Problem
Since Cody is 5 years old, it's pernicious. A <http://rosettacode.org/wiki/Pernicious_numbers Pernicious number> is an integer w...

mehr als 3 Jahre vor

Gelöst


Find the largest number
Find the largest number |x| among 4 numbers given as variables |a|, |b|, |c|, and |d|. Example: Input: a = 4; b = 7; c ...

mehr als 3 Jahre vor

Gelöst


Narcissistic number ?
Inspired by Problem 2056 created by Ted. In recreational number theory, a narcissistic number is a number that is the sum of ...

mehr als 3 Jahre vor

Gelöst


The 5th Root
Write a function to find the 5th root of a number. It sounds easy, but the typical functions are not allowed (see the test su...

mehr als 3 Jahre vor

Gelöst


How many Integers?
Count the integers in a given vector |v|. You *must* use a loop to count each element separately. Examples: Input: v...

mehr als 3 Jahre vor

Gelöst


Eye Squared
For a positive integer |n| create the identity matrix with |n| elements. In case it is not possible to produce an identity ma...

mehr als 3 Jahre vor

Gelöst


Sum of adjacent elements in a vector
Given a vector v, return a vector s containting the sum of every two adjacent elements in the vector. Every element s(i) cont...

mehr als 3 Jahre vor

Gelöst


Determine if input is a Narcissistic number
<http://en.wikipedia.org/wiki/Narcissistic_number Narcissistic number> is a number that is the sum of its own digits each raised...

mehr als 3 Jahre vor

Gelöst


Find out sum of prime number till given number
Find out sum of prime number till given number Example, if number is 10, then answer must be 17.

mehr als 3 Jahre vor

Gelöst


Tiling a matrix
Given a matrix and a number of columns, replicate matrix in a single row

mehr als 3 Jahre vor

Gelöst


Convert Fahrenheit to Celsius
Calculate the Celsius temperature C given the Fahrenheit temperature F. Examples: Input F = 90 Output C is 32.22 I...

mehr als 3 Jahre vor

Mehr laden