Risolto


Find the peak 3n+1 sequence value
A Collatz sequence is the sequence where, for a given number n, the next number in the sequence is either n/2 if the number is e...

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

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

circa 3 anni fa

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

circa 3 anni fa

Risolto


Dimensions of a rectangle
The longer side of a rectangle is three times the length of the shorter side. If the length of the diagonal is x, find the width...

circa 3 anni fa

Risolto


Area of an Isoceles Triangle
An isosceles triangle has equal sides of length x and a base of length y. Find the area, A, of the triangle. <<https://imgur...

circa 3 anni fa

Risolto


Find a Pythagorean triple
Given four different positive numbers, a, b, c and d, provided in increasing order: a < b < c < d, find if any three of them com...

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

circa 3 anni fa

Risolto


Length of the hypotenuse
Given short sides of lengths a and b, calculate the length c of the hypotenuse of the right-angled triangle. <<https://i.imgu...

circa 3 anni fa

Risolto


Area of an equilateral triangle
Calculate the area of an equilateral triangle of side x. <<https://i.imgur.com/jlZDHhq.png>> Image courtesy of <http://up...

circa 3 anni fa

Risolto


Side of a rhombus
If a rhombus has diagonals of length x and x+1, then what is the length of its side, y? <<https://imgur.com/x6hT6mm.png>> ...

circa 3 anni fa

Risolto


Length of a short side
Calculate the length of the short side, a, of a right-angled triangle with hypotenuse of length c, and other short side of lengt...

circa 3 anni fa

Risposto
How to show each iteration in for loop?
Add this after dydx=... line: fprintf('xo = %10.5f yo = %10.5f dydx = %10.5f \n', xo, yo, dydx);

circa 3 anni fa | 0

| accettato

Risposto
How Can I put an asterisk as superscript and letters as subscript to a letter in ylabel of matlab plot?
The following will do: xlabel('\it H_{cs}^*', 'FontWeight', 'bold')

circa 3 anni fa | 2

| accettato

Risposto
Plot data from matrix longitude, latitude and variable
x = linspace(min(data(:,1)), max(data(:,1)), 200); y = linspace(min(data(:,2)), max(data(:,2)), 200); [xg, yg] = meshgrid(x, y...

circa 3 anni fa | 0

| accettato

Risposto
Making heading data continuous (i.e. instead of 359 --> 0 degrees make it 359 --> 360 degrees)
Try this: plot(rad2deg(unwrap(deg2rad(BE7249B00{:, 6})))); % The data is 6th column

circa 3 anni fa | 0

| accettato

Risposto
How do I reshape a vector into a zero-diagonal matrix?
Try this: x=[1;2;3;4;5;6;7;8;9;10;11;12] % y=[1;2;3;4;5;6] m = 4; % matrix size a = [zeros(m-1,1), reshape(x, m, m-1)' ]'...

circa 3 anni fa | 0

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

circa 3 anni fa

Risolto


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

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

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

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

circa 3 anni fa

Risposto
Average specific times across a range of dates
% Create the data cell array x ={ '6-22-2015 15:04', 5 '6-22-2015 15:05', 2 '6-22-2015 15:06', 3 '6-23-2015 15:04', 10 ...

circa 3 anni fa | 0

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

circa 3 anni fa

Risposto
How do I make a low-pass filter on this data set?
Consider the following function which has a Low pass filter build in: [Y,Ty] = resample(X,Tx,Fs) uses interpolation and...

circa 3 anni fa | 0

Carica altro