Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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.

fast 13 Jahre vor

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

fast 13 Jahre vor | 0

| akzeptiert

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

fast 13 Jahre vor | 0

Gelöst


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

fast 13 Jahre vor

Gelöst


Add two numbers
Add two numbers (For beginners)

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

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

fast 13 Jahre vor | 9

| akzeptiert

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

Gelöst


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

fast 13 Jahre vor

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

fast 13 Jahre vor | 0

| akzeptiert

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

fast 13 Jahre vor | 3

| akzeptiert

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

fast 13 Jahre vor | 1

| akzeptiert

Mehr laden