Solved

RISK board game battle simulation
Given two positive integer inputs, a (attacker army units) and d (defender army units) return the probablity of victory (from 0....

etwa 2 Monate ago

Solved

Vogel-Dobbener entropy
*Vogel-Dobbener entropy* is a measure of dispersion for ordinal variables. Given an ordered list of distinct observations u_...

2 Monate ago

Solved

Maximum Intra-Vector Swaps
This Challenge, based upon a contest in which Rokicki came in 2nd, is to find sequences containing 1:N that require maximum iter...

2 Monate ago

Solved

One of the most useful skills a programmer can develop is the skill — or habit — of writing descriptive comments within/above th...

2 Monate ago

Solved

Find similar/related functions
The _help_ function can be useful for getting quick assistance on a particular function. For most built-in MATLAB functions, a p...

2 Monate ago

Solved

Mmm! Multi-dimensional Matrix Multiplication
You have got a couple of multi-dimensional matrices, A and B. And want to multiply them. For the first 2 dimensions, an ordinary...

2 Monate ago

Solved

Compound Interest Rate Calculation With Yearly Deposition Into A Bank Account
The problem adds a twist to the compound interest calculation by having the bank account owner depositing a fixed amount of mone...

3 Monate ago

Solved

Plot Line Specifications
Create a line plot for function cos(x) where x is a vector of linearly spaced values going from 0 to input N with an increment o...

3 Monate ago

Solved

Solve the following boundary value problem
Return the sum of sum(res.y) y"+|y|=0 y(0)=a y(4)=b Tip: use bvp4c

3 Monate ago

Solved

Should Mr McNugget even get out of bed today?
As we learned in <http://www.mathworks.com/matlabcentral/cody/problems/42888-frobenius-mcnugget-factorization an earlier problem...

3 Monate ago

Solved

FIFA World Cup 2014 : Offside
This problem is about offside rule in football (soccer). Input is a matrix with mostly zeros and a few 1, 2, 3 and 4s. A zer...

3 Monate ago

Solved

Sum the Infinite Series II
For any x in the range 0 < x and x < 2*pi radians, find the sum of the following infinite series: c = 1 + 1/2*cos(x) + 1/2*3...

3 Monate ago

Solved

Wrap a vector, but insert NaN's at the wrap-positions.
When you plot a line that wraps, and do not want the sawtooth shape to show up in the plot, you can either draw all separate lin...

3 Monate ago

Solved

Packing Santa's Sleigh: First Layer
This Challenge is inspired by the <http://www.kaggle.com/c/packing-santas-sleigh Packing Santa's Sleigh> contest at kaggle that ...

3 Monate ago

Solved

Write a code to give student grade
Write a code to give student ' pass' grade if he/she gets more than 49 in the exam, and 'fail' grade otherwise. ''Many of lif...

3 Monate ago

Solved

Probabilities - More brains than luck
This problem is related to <http://it.mathworks.com/matlabcentral/cody/problems/596-more-luck-than-brains Problem 596. More luck...

3 Monate ago

Solved

Back to basics: throwing errors / exceptions
*Throwing and handling errors (or exceptions) is an important part of practical programming.* Here your task is to provide ...

3 Monate ago

Solved

Multivariate polynomials - emulate symbolic form

3 Monate ago

Solved

Problems <https://www.mathworks.com/matlabcentral/cody/problems/44260-multivariate-polynomials-convert-monomial-form-to-array 44...

3 Monate ago

Solved

Multivariate polynomials - convert monomial form to array
In <https://www.mathworks.com/matlabcentral/cody/problems/44259-product-of-two-multidimensional-polynomials Problem 44259> I ask...

3 Monate ago

Solved

Product of two multivariate polynomials
MATLAB <https://www.mathworks.com/help/matlab/polynomials.html has a few functions> for creating and manipulating single-variabl...

3 Monate ago

Solved

High Precision Square Root (Inspired by Project Euler 80)
Given a positive integer n which is not a perfect square, write a MATLAB script that will calculate the square root of n truncat...

3 Monate ago

Solved

Determine the number of maximal cliques in an undirected graph
In an undirected graph, a clique is a subset of vertices that are fully connected, i.e. there is an edge between all pairs of ve...

3 Monate ago

Solved

Path Optimization thru N words : Time Optimization
This is an extension of <http://www.mathworks.com/matlabcentral/cody/problems/196-love-is-an-n-letter-word Cody 196 love> with ...

4 Monate ago

Solved

BattleShip - Petty Officer (Level 2)
<http://www.conceptispuzzles.com/index.aspx?uri=puzzle/battleships Games Magazine Battleships> is a logic puzzle to find the Fle...

4 Monate ago

Solved

Battleship - Seaman Level
<http://www.conceptispuzzles.com/index.aspx?uri=puzzle/battleships Games Magazine Battleships> is a logic puzzle to find the Fle...

4 Monate ago

Solved

Graceful Graph: Wichmann Rulers
This Challenge is to find maximum size Graceful Graphs via Wichmann Rulers for P>13. This Challenge is related to the <http://w...

4 Monate ago

Solved

Key Generation for Solitaire Cipher
The Solitaire Cipher by Bruce Schneier was introduced to Cody in two problems by Doug Hull: http://www.mathworks.com/matlabcent...

4 Monate ago

Solved

Prime Sequences: AP-k Minimum Final Value
Welcome to Fun with Primes. Today we will find the Minimum Final Value AP-k sequences for n_max=3:12 given the primorial and kno...

4 Monate ago

Solved

Create a Video
Create an avi video of the function surf(sin(2*pi*k/20)*Z,Z) for k=1:100 with an avi "quality" of 5. The standard quality is ...

4 Monate ago