Solved


Find duplicate number from a vector of size n + 1 containing numbers from 1:n
From a given vector of size n + 1, return the duplicate number. Constraints The vector can only contain numbers from 1 to ...

2 years ago

Solved


return 4
Return 4

2 years ago

Solved


Multiply by 5
Given an input x (scalar), multiply it by 5.

2 years ago

Solved


Find cross product of 2 vectors
Find cross product of 2 vectors

2 years ago

Solved


Find sum of alternate numbers in a vector
Find sum of alternate numbers in a vector starting from index 1

2 years ago

Solved


Matrix symmetry
Given a matrix A = [1 2 3; 4 5 6] Flip it horizontally and vertically to obtain a complete reversal of both rows and columns. ...

2 years ago

Solved


A times B
A times B

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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

2 years ago

Solved


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.

2 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Solved


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

3 years ago

Load more