Solved


Uniform binary crossover
Given two binary vectors, return the two children by combining the genes of them using a binary crossover mask. More informat...

13 years ago

Solved


THE CALCULATOR OF LOVE
In honor of Valentine's Day, program a love calculator that figures out the percentage of compatibility between two people using...

13 years ago

Solved


Construct an index vector from two input vectors in vectorized fashion
Create an index vector defined by two input vectors, one defining the beginnings of one or more index ranges, and the other defi...

13 years ago

Solved


Sort an array of structures
You need to sort an array of structures based upon *a numeric first field*: For example : a.n=1; a.name='a'; b.n=3...

13 years ago

Solved


Pull the variable y_correct from the Caller's Workspace
*Description* This highlights a very easy to use and high-scoring cheat that can be used on almost all Cody questions.

13 years ago

Answered
Adding fields to struct within variable editor
From within the variable editor window: Right click -> New Then modify the field's value to whatever you like.

13 years ago | 0

| accepted

Answered
Puzzler for a Monday
Here's my solution. It's ugly, but I think it's fairly general. :P function A = cell_shuffle(A) idx = cellfun(@(x)iseq...

13 years ago | 0

Solved


The sum of individual numbers...
Well this one is taking a number and then summing the individual parts till you reach a value of 1, 2, 3, 4, 5, 6, 7, 8, 9, or 0...

13 years ago

Solved


Add two numbers
Add two numbers (For beginners)

13 years ago

Solved


Find the logic
There exists one logic in between input and output. Find it (easy math). Example 1: x=13 then y=339; Example 2: x=26...

13 years ago

Solved


Kaprekar numbers
Test if the input is a Kaprekar number: <http://mathworld.wolfram.com/KaprekarNumber.html>. Return a logical true or false. ...

13 years ago

Answered
Repeat Try/Catch loop?
You could embed your try/catch statements in a while loop, then check a condition at the beginning each iteration to see if the ...

13 years ago | 9

| accepted

Solved


Decode a simplified barcode
Given a bar code from this <http://www.mathworks.com/matlabcentral/cody/problems/602-make-a-simplified-bar-code exercise>: Re...

13 years ago

Solved


Calculate value of capacitor
Given the value of resistance and time at which capacitor charges to it's 99%. calculate the value of capacitor

13 years ago

Solved


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

13 years ago

Solved


convert matrix to single column
given any matrix, convert it to single column

13 years ago

Solved


Nonuniform quantizer as a piecewise constant function
Implement a nonuniform quantizer as the following piecewise function: y = -3.5, x < 3 y = -1.5, -3 &#8804; x < -1 y = -...

13 years ago

Solved


capable husband?
* The prospective husband must pass a background check, * and *functions* faithfully, as suggested by <http://www.mathworks.com...

13 years ago

Solved


Wind outward from the center ...
Create an n-by-n matrix with elements ranging from 1 to n^2 in a rectangular spiral pattern. Example if n = 5 : 21 ...

13 years ago

Solved


Specific toolboxes
Given a string that is the name of a MATLAB toolbox, return true if it is available on the Cody solvers evaluation system, false...

13 years ago

Solved


intersection of matrices
Given two matrices filled with ones and zeros, determine if they share a common row, column entry. These matrices are of identi...

13 years ago

Solved


Split a string into chunks of specified length
Given a string and a vector of integers, break the string into chunks whose lengths are given by the elements of the vector. Ex...

13 years ago

Solved


Remove NaNs and numbers adjacent to NaNs
The aim is to remove the elements before and after NaN occurrences inside a vector. For example: x = [6 10 5 8 9 NaN 23 1...

13 years ago

Solved


Create incremental spiral WITHOUT USING EVAL or FEVAL
Constructions that use feval or eval are used to cheat with cody. This test-suite tries to avoid that trick. The goal of this...

13 years ago

Solved


When can one be the Life Member of the IEEE?
Consult the site http://en.wikipedia.org/wiki/Ieee from where it can be seen that IEEE Members who have reached the age of 65 an...

13 years ago

Solved


Longest run of consecutive numbers
Given a vector a, find the number(s) that is/are repeated consecutively most often. For example, if you have a = [1 2 2 2 1 ...

13 years ago

Solved


Phonebook-like problem
strcmpi('Yes', 'No')

13 years ago

Answered
How to assisgn char data into empty Edit Text in Matlab GUI ?
Assuming you created your GUI using GUIDE: set(handles.edit1,'String',scale)

13 years ago | 0

| accepted

Answered
Attempt to reference field of non-structure array
You need to remove ".txt.", as your test file isn't loaded in as a structure and Matlab is interpreting the period as referencin...

13 years ago | 3

| accepted

Answered
How to call a property?
Does the following work? newVar = fit.Variance;

13 years ago | 1

| accepted

Load more