geometric progression
I've modified my <http://uk.mathworks.com/matlabcentral/cody/problems/2800-arithmetic-progression previous program> so that it n...
約2年 前
解決済み
arithmetic progression
I've written a program to generate the first few terms of <https://en.wikipedia.org/wiki/Arithmetic_progression arithmetic progr...
約2年 前
解決済み
Find similar sequences
Another problem inspired by a question on the <http://www.mathworks.com/matlabcentral/answers answers> forum.
Given a matrix ...
約2年 前
解決済み
Generate Square Wave
Generate a square wave of desired length, number of complete cycles and duty cycle. Here, duty cycle is defined as the fraction ...
約2年 前
解決済み
Decimation - Optimized for speed
This problem is similar to http://www.mathworks.com/matlabcentral/cody/problems/1092-decimation, only this time the score will b...
約2年 前
解決済み
Decimation
When dealing to the Roman Army, the term decimate meant that the entire unit would be broken up into groups of ten soldiers, and...
約2年 前
解決済み
Finding peaks
Find the peak values in the signal. The peak value is defined as the local maxima.
For example,
x= [1 12 3 2 7 0 3 1 19 7];
...
Largest Geometric Series
Extension of Ned Gulley's wonderful Problem 317.
In a geometric series, ratio of adjacent elements is always a constant value. ...
約2年 前
解決済み
Flipping
Write code that can reverse the vector without using any sort of loop.
Example
Given the input vector
A = [ 1 2 3 4 5...
約2年 前
解決済み
Flip the diagonal values
Write a program that flip the elements of main diagonal , upper and lower diagonal values of a sqare matrix.
For example if a ...
約2年 前
解決済み
Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').
約2年 前
解決済み
Flipping a Matrix
Flipping matrix up and down.
If a central row is exists, leave it, and flip remaining rows.
Example
Mat = magic(3)
...
約2年 前
解決済み
swap sign sum & multiply castles
It is an easy problem, if you know the answer.
Given a square matrix of NxN ordinary numbers.
Initially place N identical indi...
約2年 前
解決済み
Swap two numbers
Example
Input:
a = 10
b = 20
Output
a = 20
b = 10