Basic Physics I
Calculate the energy by the famous formula of Albert Einstein.
11日 前
解決済み
matrix zigzag
Unfold a 2-D matrix to a 1-D array in zig-zag order, e.g., for matrix
[ 1 2 3 ;
4 5 6 ;
7 8 9 ]
the resulting 1-...
11日 前
解決済み
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 ...
11日 前
解決済み
Sum of series VI
What is the sum of the following sequence:
Σk⋅k! for k=1...n
for different n?
11日 前
解決済み
Sum of series V
What is the sum of the following sequence:
Σk(k+1) for k=1...n
for different n?
11日 前
解決済み
Sum of series III
What is the sum of the following sequence:
Σ(2k-1)^3 for k=1...n
for different n?
11日 前
解決済み
Sum of series II
What is the sum of the following sequence:
Σ(2k-1)^2 for k=1...n
for different n?
11日 前
解決済み
Sum of series I
What is the sum of the following sequence:
Σ(2k-1) for k=1...n
for different n?
11日 前
解決済み
Bit Reversal
Given an unsigned integer _x_, convert it to binary with _n_ bits, reverse the order of the bits, and convert it back to an inte...
11日 前
解決済み
Find out sum and carry of Binary adder
Find out sum and carry of a binary adder if previous carry is given with two bits (x and y) for addition.
Examples
Previo...
Remove element(s) from cell array
You can easily remove an element (or a column in any dimension) from a normal matrix, but assigning that value (or range) empty....
11日 前
解決済み
Convert a Cell Array into an Array
Given a square cell array:
x = {'01', '56'; '234', '789'};
return a single character array:
y = '0123456789'
Create a cell array out of a struct
Create a cell array out of a (single) struct with the fieldname in the first column and the value in the second column:
in:
...