Estadísticas
0 Preguntas
1 Respuesta
0 Problemas
287 Soluciones
CLASIFICACIÓN
14.021
of 289.736
REPUTACIÓN
2
CONTRIBUCIONES
0 Preguntas
1 Respuesta
ACEPTACIÓN DE RESPUESTAS
0.00%
VOTOS RECIBIDOS
1
CLASIFICACIÓN
of 19.580
REPUTACIÓN
N/A
EVALUACIÓN MEDIA
0.00
CONTRIBUCIONES
0 Archivos
DESCARGAS
0
ALL TIME DESCARGAS
0
CLASIFICACIÓN
594
of 144.110
CONTRIBUCIONES
0 Problemas
287 Soluciones
PUNTUACIÓN
2.910
NÚMERO DE INSIGNIAS
5
CONTRIBUCIONES
0 Publicaciones
CONTRIBUCIONES
0 Público Canales
EVALUACIÓN MEDIA
CONTRIBUCIONES
0 Temas destacados
MEDIA DE ME GUSTA
Feeds
Resuelto
Make a list string
Given a cell string, produce a string separating the items with spaces and commas and with an 'and' preceding the final item, an...
casi 11 años hace
Resuelto
root?
* Given a function 'foo', and a position 'there', find the root near 'there'. * For example: If foo=@sin, and there=3.1, then r...
alrededor de 11 años hace
Resuelto
Sort numbers by outside digits
Sort the array so that they are sorted as if their value was a 5 digit number made from the first three and last two digits of t...
alrededor de 11 años hace
Resuelto
Sum the Digits of a Number
Given an integer, sum the digits repeatedly until you end up with a single value less than 10. For example, if you add the di...
alrededor de 11 años hace
Resuelto
Count up then down
Create a function that produces counting up from 0 up to n then down to 0 n=2 --> 0 1 2 1 0 n=3 --> ...
alrededor de 11 años hace
Resuelto
Replicate elements in vectors
Replicate each element of a row vector (with NaN) a constant number of times. Examples : n=2, A=[1 2 3] -> [1 1 2 2 3 3] n=0...
alrededor de 11 años hace
Resuelto
Create a vector whose elements depend on the previous element
The idea is to create a vector A whose elements depend on the previous element : *A(i+1) = 2*A(i)+1* *2 Inputs*: - A : The...
alrededor de 11 años hace
Resuelto
Create a random logical vector of N elements of which M are true.
Your task for tomorrow is to create a random binary (logical) vector of N elements of which M are true. For example: ran...
más de 11 años hace
Resuelto
Add two numbers
Calculate the sum of two numbers. Example input = [2 3] output = 5
más de 11 años hace
Resuelto
What is the distance from point P(x,y) to the line Ax + By + C = 0?
Given a point, P(x,y), find the distance from this point to a linear line. INPUTS: x, y, A, B, C OUTPUTS: d, the distance ...
más de 11 años hace
Resuelto
Sum the entries of each column of a matrix which satisfy a logical condition.
Given a numeric matrix A and a logical array L of the same size as A, return a row vector S containing the columnwise sums of th...
más de 11 años hace
Resuelto
Fill a zeros matrix
The aim is to fill an array of all zeros given a numerical value and the index of row and columns for this value. 3 Inputs: ...
más de 11 años hace
Resuelto
Generate N equally spaced intervals between -L and L
Given N and L, return a list of numbers (in ascending order) that divides the interval [-L L] into N equal-length segments. F...
más de 11 años hace
Resuelto
Better bullseye matrix
<http://www.mathworks.com/matlabcentral/cody/problems/18-bullseye-matrix Problem 18> asks to create a bullseye matrix like this:...
más de 11 años hace
Resuelto
Generate a vector like 1,2,2,3,3,3,4,4,4,4
Generate a vector like 1,2,2,3,3,3,4,4,4,4 So if n = 3, then return [1 2 2 3 3 3] And if n = 5, then return [1 2 2...
más de 11 años hace
Resuelto
Triangle Numbers Below N
This is an offshoot of <http://www.mathworks.com/matlabcentral/cody/problems/5-triangle-numbers Cody Problem 5: Triangle Numbers...
más de 11 años hace
Resuelto
Make a 1 hot vector
Make a vector of length _N_ that consists of all zeros except at index _k_, where it has the value 1. Example: Input ...
más de 11 años hace
Resuelto
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...
más de 11 años hace
Resuelto
Make a simplified barcode
Given an integer to encode, make a barcode using the following encoding scheme: * The bar code is made from the binary versio...
más de 11 años hace
Resuelto
commutative?
Given the handle to a binary function that takes two ordinary numbers, test if the function is commutative.
más de 11 años hace
Resuelto
Is the Point in a Circle?
Check whether a point or multiple points is/are in a circle centered at point (x0, y0) with radius r. Points = [x, y]; c...
más de 11 años hace
Resuelto
Find number of days
The input is two date in string format (dd-mm-yyyy) find out the number of days between these two dates. Example: input: ...
más de 11 años hace
Resuelto
Remove from a 2-D matrix all the rows that contain at least one element less than or equal to 4
Example: in = magic(5) in = 17 24 1 8 15 23 5 7 14 16 4 6 13 20 ...
más de 11 años hace
Resuelto
Remove the two elements next to NaN value
The aim is to *remove the two elements next to NaN values* inside a vector. For example: x = [6 10 5 8 9 NaN 23 9 7 3 21 ...
más de 11 años hace
Resuelto
Find indices of multiple minima in a vector
I have a vector, say: x= [ 1 5 6 2 6 1 3 5 1] Now I would like to get the index of the minimum values in this vector. When...
más de 11 años hace
Resuelto
Mersenne Primes
A Mersenne prime is a prime number of the form M = 2^p - 1, where p is another prime number. For example, 31 is a Mersenne prim...
más de 11 años hace
Resuelto
Function composition
Write a function that accepts two function handles f and g and returns the composition h. That is, h = (f o g)(x) = f(g(x)) ...
más de 11 años hace
Resuelto
Parasitic numbers
Test whether the first input x is an n-parasitic number: <http://en.wikipedia.org/wiki/Parasitic_number>. ( _n_ is the second in...
más de 11 años hace
Resuelto
Back to basics 19 - character types
Covering some basic topics I haven't seen elsewhere on Cody. Return the number of punctuation characters in the input variabl...
más de 11 años hace
Resuelto
Calculate the Levenshtein distance between two strings
This problem description is lifted from <http://en.wikipedia.org/wiki/Levenshtein_distance>. The Levenshtein distance betwee...
más de 11 años hace