Combined Ages 1 - Symmetric, n = 3
You have probably seen the common riddle wherein combined ages are provided and you must determine the individual ages. For exam...
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...
Back to basics 10 - Max Float
Covering some basic topics I haven't seen elsewhere on Cody.
Return the largest positive floating-point number MATLAB can han...
約1年 前
解決済み
Do you like your boss?
Do you like your boss?
Answer can be any string!
For example:
Boss = 'Do you like your boss?';
Output = 'yes'
or
...
約1年 前
解決済み
Duplicate each element of a vector.
for an n-dimensional vector x, the function should return another vector 2n-dimension which each element is repeated twice.
Ex...
約1年 前
解決済み
The Piggy Bank Problem
Given a cylindrical piggy bank with radius g and height y, return the bank's volume. [ g is first input argument.]
Bonus though...
約1年 前
解決済み
03 - Matrix Variables 4
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_3d.png>>
A 3x4 NaN (Not a Number) matrix
(Hint: use ...
Multiply a column by a row
* Given a column vector C and and a row vector R.
* Output a matrix M.
* Every column of M equals to C multiplied by correspon...
約1年 前
解決済み
Back to basics 11 - Max Integer
Covering some basic topics I haven't seen elsewhere on Cody.
Return the largest positive integer MATLAB can handle.
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 ...
約1年 前
解決済み
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...
約1年 前
解決済み
Flip the bit
Given an input character string (e.g. '1001'), return a character string with the bits flipped ('0110').