Gelöst


A times B
A times B

fast 3 Jahre vor

Gelöst


Determine if input is greater than pi
Evaluate if given number is greater than pi. If greater, return true; else, return false.

fast 3 Jahre vor

Gelöst


Fibonacci Sequence
Write a MATLAB function called fibonacci_sequence(n) that takes an integer n as input and returns the first n terms of the Fibon...

fast 3 Jahre vor

Gelöst


Determine if input is greater than 100
Evaluate if given number is greater than 100. If greater, return true; else, return false.

fast 3 Jahre vor

Gelöst


A Mathematical Problem
Find the kth digit of the inverse of a number 'n'. Assumption: n>1

fast 3 Jahre vor

Gelöst


Find the mean of the magic x
Given a x term, find the magic x, then find the mean/average of any one row or column.

fast 3 Jahre vor

Gelöst


Armstrong Number
Write a function name armstrong_check that checks whether the given input is an Armstrong Number or not. It returns logical True...

etwa 3 Jahre vor

Gelöst


Sequence Vectorization - I
Given a Natural number N, return the sequence - [1 1 2 1 2 3 1 2 3 4 ... 1 2 3 ... N-3 N-2 N-1 N] i.e. the horizontal concatenat...

etwa 3 Jahre vor

Gelöst


Function(4)
Hit submit for some points! function y = your_fcn_name(x) y = x^2 - 4; end

etwa 3 Jahre vor

Gelöst


Easy Function(1)
Use this function to earn some cody points! function y = your_fcn_name(x) y = x^2 - 1; end

etwa 3 Jahre vor

Gelöst


Easy Function(2)
Hit the submit button for some cody points! function y = your_fcn_name(x) y = x^2 + 20; end

etwa 3 Jahre vor

Gelöst


Easy Function(3)
Hit submit for some free points. function y = your_fcn_name(x) y = x^2 + 30; end

etwa 3 Jahre vor

Gelöst


Easy Function(4)
Use the submit button to earn points function y = your_fcn_name(x) y = x^2 + 40; end

etwa 3 Jahre vor

Gelöst


Find The area of the square
Given that the length of the side of a square is x, find the area.

etwa 3 Jahre vor

Gelöst


Generate Hadamard Matrix without using hadamard function
In mathematics, a Hadamard matrix, named after the French mathematician Jacques Hadamard, is a square matrix whose entries are e...

etwa 3 Jahre vor

Gelöst


Back to basics 1 - Saving
Covering some basic topics I haven't seen elsewhere on Cody. Given an input variable 'x', save it to disk in a file named 'co...

mehr als 3 Jahre vor

Gelöst


Leap Year
According to Gregorian Calender(which is in use now, in many countries),decide whether a given year is a leap year or not. Give...

mehr als 3 Jahre vor

Gelöst


Convert a vector of Integers into a matrix of binaries
Convert a vector of positive integers into a matrix containing their binary representation. Each column of the output contains t...

mehr als 3 Jahre vor

Gelöst


Find Current in R circuit.
Find the current in an R circuit for a given input of Voltage (V) and Resistance(R).

mehr als 3 Jahre vor

Gelöst


Find alternating sum
Given an array, find alternating sum i.e. – y = x (1) – x (2) + x (3) – x (4) + x (5) - …

mehr als 3 Jahre vor

Gelöst


Compare a value to a vector
Given a random value X and a random vector Y. you have to compare X to the Vector Y and make a decision. case 1: X is a value i...

mehr als 3 Jahre vor

Gelöst


The rabbit problem
Suppose a newly-born pair of rabbits, one male, one female, are put in a field. Rabbits are able to mate at the age of one month...

mehr als 3 Jahre vor

Gelöst


How many ways?
Create a program to determine in how many ways can a regular n-gon be divided into n-2 triangles?

mehr als 3 Jahre vor

Gelöst


Magic Matrix
We are all familiar with the concept of magic matrix. In a magic matrix, the summation of all rows, columns and both diagonals...

mehr als 3 Jahre vor

Gelöst


Penny flipping - calculate winning probability (easy)
Two players are playing a fair penny flipping game. For each flip, the winner adds one penny from the loser's collection to his/...

mehr als 3 Jahre vor

Gelöst


Design matrix from eigenvalues
Write a function that takes one input argument n and outputs a (n x n) square matrix A with the following properties: -A has...

mehr als 3 Jahre vor

Gelöst


Simple Interest : Calculate annual simple interest rate
Theorem : Simple Interest where; F : Future Value P : Present Value r : Annual simple interest rate (decimal) t : Time in...

mehr als 3 Jahre vor

Gelöst


Find the moving-average of the elements of a vector
Example Input vector: [1 2 3 4] output vector: 1st element=1/1, 2nd element=(1+2)/2, 3rd element=(1+2+3)/3, 4th element=(1+2...

mehr als 3 Jahre vor

Gelöst


Compute a nested cube root
Consider the quantity . Write a function to compute without using loops or recursion.

mehr als 3 Jahre vor

Gelöst


Sum the unitary divisors of a number
Cody Problems 1933 and 46898 deal with , the sum of divisors function. This problem deals with , the sum of unitary divisors fun...

mehr als 3 Jahre vor

Mehr laden