A résolu


Summing Digits within Text
Given a string with text and digits, add all the numbers together. Examples: Input str = '4 and 20 blackbirds baked in a...

presque 4 ans il y a

A résolu


Tic Tac Toe FTW
Given a tic tac toe board: * 1 represents X * 0 represents empty. * -1 represents O It is X's move. If there is an imme...

presque 4 ans il y a

A résolu


Pattern matching
Given a matrix, m-by-n, find all the rows that have the same "increase, decrease, or stay same" pattern going across the columns...

presque 4 ans il y a

A résolu


The Goldbach Conjecture
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

presque 4 ans il y a

A résolu


Find state names that end with the letter A
Given a list of US states, remove all the states that end with the letter A. Example: Input s1 = 'Alabama Montana Nebras...

presque 4 ans il y a

A résolu


Elapsed Time
Given two date strings d1 and d2 of the form yyyy/mm/dd HH:MM:SS (assume hours HH is in 24 hour mode), determine how much time, ...

presque 4 ans il y a

A résolu


Encode Roman Numerals
Create a function taking a non-negative integer as its parameter and returning a string containing the Roman Numeral representat...

presque 4 ans il y a

A résolu


The Goldbach Conjecture, Part 2
The <http://en.wikipedia.org/wiki/Goldbach's_conjecture Goldbach conjecture> asserts that every even integer greater than 2 can ...

presque 4 ans il y a

A résolu


Word Counting and Indexing
You are given a list of strings, each being a list of words divided by spaces. Break the strings into words, then return a maste...

presque 4 ans il y a

A résolu


Find the two-word state names
Given a list of states, remove all the states that have two-word names. If s1 = 'Alabama Montana North Carolina Vermont N...

presque 4 ans il y a

A résolu


Kaprekar Steps
6174 is the <http://en.wikipedia.org/wiki/6174_%28number%29 Kaprekar constant>. All natural numbers less than 10,000 (except som...

presque 4 ans il y a

A résolu


Vector creation
Create a vector using square brackets going from 1 to the given value x in steps on 1. Hint: use increment.

presque 4 ans il y a

A résolu


Doubling elements in a vector
Given the vector A, return B in which all numbers in A are doubling. So for: A = [ 1 5 8 ] then B = [ 1 1 5 ...

presque 4 ans il y a

A résolu


Create a vector
Create a vector from 0 to n by intervals of 2.

presque 4 ans il y a

A résolu


Flip the vector from right to left
Flip the vector from right to left. Examples x=[1:5], then y=[5 4 3 2 1] x=[1 4 6], then y=[6 4 1]; Request not ...

presque 4 ans il y a

A résolu


Whether the input is vector?
Given the input x, return 1 if x is vector or else 0.

presque 4 ans il y a

A résolu


Find max
Find the maximum value of a given vector or matrix.

presque 4 ans il y a

A résolu


Get the length of a given vector
Given a vector x, the output y should equal the length of x.

presque 4 ans il y a

A résolu


Inner product of two vectors
Find the inner product of two vectors.

presque 4 ans il y a

A résolu


Arrange Vector in descending order
If x=[0,3,4,2,1] then y=[4,3,2,1,0]

presque 4 ans il y a

A résolu


Project Euler: Problem 2, Sum of even Fibonacci
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 te...

presque 4 ans il y a

A répondu
snapshot problem in video processing
snapshot() is intended for use with a cameraboard object or webcam object and you are attempting you input an image object. You...

presque 4 ans il y a | 0

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

presque 4 ans il y a

A répondu
How to graph data in cells?
Your data has an empty cell in it so the first step here is to remove that ToBeGraphed(cellfun(@isempty,ToBeGraphed))=[]; % rem...

presque 4 ans il y a | 0

| A accepté

A répondu
Extract subset of time-curves from a 4D volume
I can reduce this to a single for loop which iterates through the timesteps but i'm not sure about doing this entirely without l...

presque 4 ans il y a | 0

| A accepté

A répondu
Sum of elements in an array over x
a = [0.023 0.056 0.053 0.034 0.021 0.075 0.088]; result = sum(a(a>0.05))

presque 4 ans il y a | 1

| A accepté

A répondu
Building a matrix inside a for loop
You could do it as follows: xlsData = xlsread('PartS_all.xlsx'); partID = xlsData(:,4); uPartID = unique(partID).'; % Unique ...

presque 4 ans il y a | 0

| A accepté

A répondu
how to store coordinate values xy[] for randomly generate point
The format you used (based on the code you provided) is a structure and the format you are looking for is an array. To generate ...

presque 4 ans il y a | 0

A répondu
Multiple combinations of a matrix
Try the following, it should work for any size of M. function x = pairCombos(M) numRows = size(M,1); C = combnk(1:numRows,2...

environ 4 ans il y a | 0

| A accepté

A répondu
How to reshape in 3D a downsampled matrix
Easiest thing to do would be just this: newData = data(1:factor:end,1:factor:end,1:factor:end);

environ 4 ans il y a | 0

| A accepté

Charger plus