Solved


X plus binary inverted x
Given a n-bits number x, what is the sum of x to the binary inverted version of x? (this might be more simple than you think :-)...

2 years ago

Solved


Count letters occurence in text, specific to words with a given length.
Build a function with two input arguments: a string and a word length (number of letters), that outputs a vector of counts of th...

2 years ago

Solved


Return fibonacci sequence do not use loop and condition version 2
Calculate the nth Fibonacci number,return sequence Given n, return f where f = fib(n) and f(1) = 1, f(2) = 1, f(3) = 2, ... ...

2 years ago

Solved


Project Euler: Problem 16, Sums of Digits of Powers of Two
2^15 = 32768 and the sum of its digits is 3 + 2 + 7 + 6 + 8 = 26. What is the sum of the digits of the number 2^N? Thanks ...

2 years ago

Solved


Compute the area of a lune
Write a function to compute the area of the shaded moon-shaped region in the figure below—that is, the area of a smaller circle ...

2 years ago

Solved


Time Expansion
How can you slow down any discrete-time signal? Example Input original signal x. x = [1 2 3 -1 -2 -5 -4] We want t...

2 years ago

Solved


Regular polygon bounded by and bounding a circle
As the number of sides (or vertices) of a regular polygon goes to infinity, its perimeter and area go to the perimeter and area ...

2 years ago

Solved


How to add?
* Imagine you are in 2222 Anno Domini, when everyone must learn how to add, * and competing for the highly prestigious post of,...

2 years ago

Solved


Performance - summation
Given a vector of natural numbers x = [1,2,3,...,N] compute the sum of its elements by not stressing the machine too much...

2 years ago

Solved


Mandelbrot Number Test [Real+Imaginary]
The <http://en.wikipedia.org/wiki/Mandelbrot_set Mandelbrot Set> is built around a simple iterative equation. z(1) = c z...

2 years ago

Solved


Back to basics 25 - Valid variable names
Covering some basic topics I haven't seen elsewhere on Cody. Given a string, return true if it is a valid MATLAB variable nam...

2 years ago

Solved


mathematics , probability problem
How many different result can we have, rolling k dice?

2 years ago

Solved


Find the Area of a Polygon
Consider 2-D geometry and assume that the points are given in form of rows of a matrix. Find the area of polygon enclosed by the...

2 years ago

Solved


Rotation Matrix to Euler Angles
Given a rotation matrix, generate the Euler Angles as output [phi,theta,psi]. [phi is a rotation around X-axis, theta is rotatio...

2 years ago

Solved


Covering area
As an extension of the problem <http://www.mathworks.com/matlabcentral/cody/problems/416-polygon-area>, find the area, bounded b...

2 years ago

Solved


Area of Triangle with Oblique Coordinates
Find area of triangle given points p1, p2, and p3 where the y-axes is w degrees counter clockwise from the x-axes. For exampl...

2 years ago

Solved


Free-time Equation
Given a 7-day week, an *_nc_* -number of *_tc_* -hour classes, *_ta_* -hours awake in a day, and *_tw_* -hours that you work in ...

2 years ago

Solved


Permutations of input vector
Find and output all permutations of given vector

2 years ago

Solved


Count the ways to write 1/n as the sum of two unit fractions
The number 1/2 can be written as 1/3+1/6 and 1/4+1/4, and the number 1/9 can be written as 1/18+1/18, 1/12+1/36, and 1/10+1/90. ...

2 years ago

Solved


Convert decimal to binary and then generate the minimum binary it can with jumbling
input is 10 --> 1010 output should be 3 --> 0011 input 23 --> 10111 output should be 15 --> 01111

2 years ago

Solved


Modulation index
The amplitude of the carrier signal is 2V and the amplitude of the modulating signal is 8V. Find its modulation index.

2 years ago

Solved


DC-DC boost converter
Find the output voltage of a DC-DC boost converter given input voltage and the duty cycle ratio

2 years ago

Solved


Binary Coder
Take an input number and print the binary value of this number.

2 years ago

Solved


Find primes and integers that solve an equation
Write a function to find all primes and non-negative integers that solve the equation where is an integer. If there are no...

2 years ago

Solved


Cos x
Retorne o cosseno de x, onde x está em radianos

2 years ago

Solved


Eleve ao cubo!
dado uma entrada x, encontre o seu cubo

2 years ago

Solved


Número de elementos do array
Retorne o número de elementos de um array

2 years ago

Solved


Seno de x
Calcule o seno de x, onde x está em radianos

2 years ago

Load more