A résolu


Add more zeros
Find code that adds one 0 to each sequence of 0 in a string (composed with only 0 or 1). For example: '1010' -> '100100' ...

environ 14 ans il y a

Publié le


Cody and Trendy release notes
Last week we made updates to both Trendy and Cody. My post today is a quick overview of some of the new features. Cody In...

environ 14 ans il y a

Thumbnail

Publié le


Cody Hits Two Milestones
We’ve had a few exciting weeks here on MATLAB Central! A month ago we introduced a new blog, Cleve’s Corner, which is...

environ 14 ans il y a

Thumbnail

A résolu


Set the array elements whose value is 13 to 0
Input A either an array or a vector (which can be empty) Output B will be the same size as A . All elements of A equal to 13...

environ 14 ans il y a

Publié le


The Master Speaks: An Interview with Cody Champion @bmtran
Bryant Tran, better known to the Cody-playing world as @bmtran, has been the leading player on Cody since the week it...

environ 14 ans il y a

Thumbnail

A résolu


Multiply 2 numbers
Very easy, you just have to multiply 2 numbers but you cannot use the following signs (*, /, - ,^) ,mtimes , times, cross, pro...

environ 14 ans il y a

Problème


Twist 'n' Match
Given n and m, construct an n-by-n matrix a such that a, when rotated 90 degrees and compared with itself, matches itself in exa...

environ 14 ans il y a | 9 | 86 solveurs

A résolu


Joining Ranges
You are given a n-by-2 matrix. Each row represents a numeric range, e.g. x = [0 5; 10 3; 20 15; 16 19; 25 25] contains...

environ 14 ans il y a

Publié le


New Features In MATLAB Answers
We’ve just released a long list of new features in MATLAB Answers. Here’s a rundown of what’s new and what’s...

environ 14 ans il y a

Thumbnail

A résolu


Matrix with different incremental runs
Given a vector of positive integers a = [ 3 2 4 ]; create the matrix where the *i* th column contains the vector *1:a(i)...

environ 14 ans il y a

A résolu


Project Euler: Problem 6, Natural numbers, squares and sums.
The sum of the squares of the first ten natural numbers is, 1^2 + 2^2 + ... + 10^2 = 385 The square of the sum of the first ...

environ 14 ans il y a

Publié le


Multipoint data gathering in Trendy
When we launched Trendy, you could only grab one data point per trend. One of our very first plots, which was created as...

environ 14 ans il y a

Thumbnail

Publié le


June MATLAB Community Updates
In today’s post, I thought I would share fun news with you about our MATLAB community plus one tip about Trendy from a...

environ 14 ans il y a

Thumbnail

Problème


Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

environ 14 ans il y a | 9 | 662 solveurs

Problème


Spot the outlier
All points except for one lie on a line. Which one is the outlier? Example: You are given a list of x-y pairs in a column ...

environ 14 ans il y a | 15 | 475 solveurs

Problème


Find a subset that divides the vector into equal halves
Given a vector x, return the indices to elements that will sum to exactly half of the sum of all elements. Example: Inpu...

environ 14 ans il y a | 14 | 402 solveurs

Problème


How long is the longest prime diagonal?
Stanislaw Ulam once observed that if the counting numbers are <http://en.wikipedia.org/wiki/Ulam_spiral arranged in a spiral>, t...

environ 14 ans il y a | 14 | 412 solveurs

Problème


Find the biggest empty box
You are given a matrix that contains only ones and zeros. Think of the ones as columns in an otherwise empty floor plan. You wan...

environ 14 ans il y a | 23 | 505 solveurs

A résolu


Symmetric matrix
You must create a n-by-n *symmetric* matrix such that A(row,col) = row/col for col >= row. Example if n =3 : output is : ...

environ 14 ans il y a

Publié le


MATLAB Central Release Notes – May 2012
Here is a quick list of recent MATLAB Central updates you might be interested in checking out: MATLAB Answers OR search...

environ 14 ans il y a

Thumbnail

A résolu


QWERTY Shift Encoder
Encode a string using the QWERTY shift code. This code is where you touch type but are offset by one character to the right. ...

environ 14 ans il y a

A résolu


Reverse the Words (not letters) of a String
*Description* Change the words of a string such that the words appear in reverse order. You may assume that the string is a n...

environ 14 ans il y a

A résolu


Make a run-length companion vector
Given a vector x, return a vector r that indicates the run length of any value in x. Each element in r shows how many times the ...

environ 14 ans il y a

A résolu


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

environ 14 ans il y a

A résolu


Reindex a vector
You are given two vectors of equal length. Vector N has numeric values (no Inf or NaN) while vector IDX has integers. Place th...

plus de 14 ans il y a

A résolu


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

plus de 14 ans il y a

A résolu


Find the sum of all the numbers of the input vector
Find the sum of all the numbers of the input vector x. Examples: Input x = [1 2 3 5] Output y is 11 Input x ...

plus de 14 ans il y a

A résolu


Determine if input is odd
Given the input n, return true if n is odd or false if n is even.

plus de 14 ans il y a

Problème


Put two time series onto the same time basis
Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

plus de 14 ans il y a | 6 | 357 solveurs

A résolu


Put two time series onto the same time basis
Use interpolation to align two time series onto the same time vector. This is a problem that comes up in <http://www.mathwork...

plus de 14 ans il y a

Charger plus