Risolto


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

quasi 3 anni fa

Risolto


Maximum value in a matrix
Find the maximum value in the given matrix. For example, if A = [1 2 3; 4 7 8; 0 9 1]; then the answer is 9.

quasi 3 anni fa

Risposto
Mouse events starter program for Matlab gui
I have made a simple figure to detect keyboard and mouse events. It will work as a starter for events proessing on GUI. My code ...

quasi 3 anni fa | 1

| accettato

Risposto
defining the mean of a values inside a matrix
Further methods 1: movmean(matrix,windowsize) it calculates running mean but considers only windowsize elements examples...

quasi 3 anni fa | 1

Risposto
Serial ports list display
You can easily display ports list in compact format pa=['all Serial Ports' serialportlist]; pav=['available Ports' serialportl...

quasi 3 anni fa | 1

| accettato

Risolto


Integer Sequence - II : New Fibonacci
Crack the following Integer Sequence. (Hints : It has been obtained from original Fibonacci Sequence and all the terms are also ...

quasi 3 anni fa

Risolto


Integer sequence - 2 : Kolakoski sequence
Get the n-th term of <https://oeis.org/A000002 Kolakoski Sequence>.

quasi 3 anni fa

Risolto


Alternating sum
Given vector x, calculate the alternating sum y = x(1) - x(2) + x(3) - x(4) + ...

quasi 3 anni fa

Risolto


Golomb's self-describing sequence (based on Euler 341)
The Golomb's self-describing sequence {G(n)} is the only nondecreasing sequence of natural numbers such that n appears exactly G...

quasi 3 anni fa

Risolto


Square Digits Number Chain Terminal Value (Inspired by Project Euler Problem 92)
Given a number _n_, return the terminal value of the number chain formed by summing the square of the digits. According to the P...

quasi 3 anni fa

Risolto


"Look and say" sequence
What's the next number in this sequence? * [0] * [1 0] * [1 1 1 0] * [3 1 1 0] * [1 3 2 1 1 0] This a variant on the w...

quasi 3 anni fa

Risolto


Return the Fibonacci Sequence
Write a code which returns the Fibonacci Sequence such that the largest value in the sequence is less than the input integer N. ...

quasi 3 anni fa

Risolto


Sum the Infinite Series
Given that 0 < x and x < 2*pi where x is in radians, write a function [c,s] = infinite_series(x); that returns with the...

quasi 3 anni fa

Risolto


Find the stride of the longest skip sequence
We define a _skip sequence_ as a regularly-spaced list of integers such as might be generated by MATLAB's <http://www.mathworks....

quasi 3 anni fa

Risolto


Is my wife right?
Regardless of input, output the string 'yes'.

quasi 3 anni fa

Risposto
I have two plots, I want to take the difference between two plots using histogram function. how can I take difference using both x and y axis
I have created an example for 1D histogram (histogram using single vector), histogram2 (2D histogram using 2 vectors), imhist(hi...

quasi 3 anni fa | 1

Risolto


Sum of first n terms of a harmonic progression
Given inputs a, d and n, return the sum of the first n terms of the harmonic progression a, a/(1+d), a/(1+2d), a/(1+3d),....

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


(Linear) Recurrence Equations - Generalised Fibonacci-like sequences
This problem is inspired by problems <http://uk.mathworks.com/matlabcentral/cody/problems/2187-generalized-fibonacci 2187>, <htt...

quasi 3 anni fa

Risolto


Is X a Fibonacci Matrix?
In honor of Cleve's new blog and post: <http://blogs.mathworks.com/cleve/2012/06/03/fibonacci-matrices/> Is X a Fibonacci ...

quasi 3 anni fa

Risolto


Fibonacci Decomposition
Every positive integer has a unique decomposition into nonconsecutive Fibonacci numbers f1+f2+ ... Given a positive integer n, r...

quasi 3 anni fa

Risolto


How many Fibonacci numbers?
Find the number of unique Fibonacci numbers (don't count repeats) in a vector of positive integers. Example: x = [1 2 3 4...

quasi 3 anni fa

Risolto


Number of Even Elements in Fibonacci Sequence
Find how many even Fibonacci numbers are available in the first d numbers. Consider the following first 14 numbers 1 1 2...

quasi 3 anni fa

Risolto


Triangle sequence
A sequence of triangles is constructed in the following way: 1) the first triangle is Pythagoras' 3-4-5 triangle 2) the s...

quasi 3 anni fa

Risolto


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

quasi 3 anni fa

Risolto


Fibonacci-Sum of Squares
Given the Fibonacci sequence defined by the following recursive relation, * F(n) = F(n-1) + F(n-2) * where F(1) = 1 and F(1)...

quasi 3 anni fa

Risolto


Sum all integers from 1 to 2^n
Given the number x, y must be the summation of all integers from 1 to 2^x. For instance if x=2 then y must be 1+2+3+4=10.

quasi 3 anni fa

Domanda


Mouse Button Press distinction
SelectionType property of figure tells which mouse button was pressed along with modifier (ctrl or shift). Normal: Left Mous...

quasi 3 anni fa | 2 risposte | 1

2

risposte

Risposto
How can I delete the rows if they have a NaN value?
Let Matrix A has NaN values, we want a matrix B which contains all rows of A except which have NaN values function testNaNRemov...

quasi 3 anni fa | 1

Risolto


Remove any row in which a NaN appears
Given the matrix A, return B in which all the rows that have one or more <http://www.mathworks.com/help/techdoc/ref/nan.html NaN...

quasi 3 anni fa

Carica altro