Risolto


Generate binary combinations for a given number of bit(s)
Generate the binary combination as in the example below. Example: If you are given: bin_comb(2) The answer will be: ...

quasi 10 anni fa

Risolto


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

quasi 10 anni fa

Risolto


Complex transpose
Calculate the transpose of a matrix having complex numbers as its elements without changing the signs of the imaginary part. ...

quasi 10 anni fa

Risolto


Simple problem creating a function from an abstract specification.
MYSTERYFUNCTION3 This takes a vector of numbers v and computes a vector w such the w[i] is the average of v[i] and the previous...

quasi 10 anni fa

Risolto


UICBioE240 2.8
Convert x number of hours into seconds.

quasi 10 anni fa

Risolto


UICBioE240 2.3
Make a 4D matrix of 4x4x3x4 containing all zeros.

quasi 10 anni fa

Risolto


UICBioE240 2.2
Make a 3x4 matrix that contains all ones.

quasi 10 anni fa

Risolto


Generalised Hamming Number
Inspired by Project Euler n°204 and Problem 1308 by James A generalised Hamming number of type n, has no prime factor larger ...

quasi 10 anni fa

Risolto


Generate a Parasitic Number
This problem is the next step up from <http://www.mathworks.com/matlabcentral/cody/problems/156-parasitic-numbers Problem 156>. ...

quasi 10 anni fa

Risolto


Polygonal numbers
The task of <http://www.mathworks.co.uk/matlabcentral/cody/problems/5 Problem 5> is to calculate triangular numbers. By playing ...

quasi 10 anni fa

Risolto


Bell Number calculator
Calculate a vector of Bell numbers for sets up to length n. Bell numbers are the maximum number of partitions of a set. See the ...

quasi 10 anni fa

Risolto


Linear system solve
Solve a linear set of equations as described in the following link: http://www.people.virginia.edu/~teh1m/cody/linsolv1.pdf

quasi 10 anni fa

Risolto


Generate the sum of Squares of the given number
|P(n) = 1^2 + 2^2 + ... + n^2| |P(1) = 1| |P(2) = 1 + 4 = 5;| |P(3) = 5 + 9 = 14;| |P(4) = 14 + 16 = 30;|

quasi 10 anni fa

Risolto


Test Problem; Create a 5x5 array containing all ones
This is a test for learning the process of creating a Cody problem. The goal of this test problem will be to create an array,...

quasi 10 anni fa

Risolto


the number of inputs
Find the number of the inputs of the function. example y = theinputnumber(x,k); function called theinputnumber has 2 in...

quasi 10 anni fa

Risolto


Matlab Basics II - Determine if an array has a 3rd dimension
For an array A, determine whether it has 3 dimensions, return 0 if x is only 2D, and 1 if x is 3D

circa 10 anni fa

Risolto


Find same numbers touching each other...
So the goal here is to find any number that is equal to its immediate neighbors and mark it true. Here is some examples: x...

circa 10 anni fa

Risolto


Is It a Palindrome?
Given a string or array, determine if it is a palindrome.

circa 10 anni fa

Risolto


Computing Wind chill
On a windy day, a temperature of 15 degrees may feel colder, perhaps 7 degrees. The formula below calculates the "wind chill," i...

circa 10 anni fa

Risolto


Max index of 3D array
Given a three dimensional array M(m,n,p) write a code that finds the three coordinates x,y,z of the Maximum value. Example ...

circa 10 anni fa

Risolto


Bruh
Return 'bruh'.

circa 10 anni fa

Risolto


Remove All elements less than 5
Given an input vector x, remove all elements of x less than 5 . Example: Input x = [ 1 2 5 7 3 ] Output y is [ 5 7 ...

circa 10 anni fa

Risolto


Test if a matrix is symmetric
Write a logical function that returns 1 if the input matrix is symmetric and 0 otherwise.

circa 10 anni fa

Risolto


The Tower of Hanoi
In the <http://en.wikipedia.org/wiki/Tower_of_Hanoi Tower of Hanoi problem> with 3 rods (1, 2 & 3), the goal is to move a tower ...

circa 10 anni fa

Risolto


Replace Nonzero Numbers with 1
Given the matrix x, return the matrix y with non zero elements replaced with 1. Example: Input x = [ 1 2 0 0 0 ...

circa 10 anni fa

Risolto


Change Vector Value
Change the element of the vector with respect to the element of the direction vector If the element of the direction vecto...

circa 10 anni fa

Risolto


Cumulative product of a vector
Cumulative product of a vector example x=[1 2 5 10], then answer must be [ 1 2 10 100] *If you like this prob...

circa 10 anni fa

Risolto


sum of the first 10 odd numbers
y = sum(first_10_odd_numbers)

circa 10 anni fa

Risolto


Back to Basics - Find no. of elements in a matrix?
Let A be a m*n matrix. Find the total no. of elements in A ? (Hint - formula based) A = [1 2 3;4 5 6]; output = 6

circa 10 anni fa

Risolto


Find all of the odd integers in a vector between the intergers 1 and 10.
Given vector of integers 1:10 [1 2 3 4 5 6 7 8 9 10]

circa 10 anni fa

Carica altro