03 - Matrix Variables 5
Make the following variable:
<<http://samle.dk/STTBDP/Assignment1_3e.png>>
5年弱 前
解決済み
Squaring Matrix
Square the following matrix using matlab
%
A = 1 2 3 4
5 6 7 8
So new matrix should display...
5年弱 前
解決済み
Sum of the Matrix Elements
Add up all the elements in a NxM matrix where N signifies the number of the rows and M signifies the number of the columns.
E...
Rounding off numbers to n decimals
Inspired by a mistake in one of the problems I created, I created this problem where you have to round off a floating point numb...
5年弱 前
解決済み
Matlab Basics - Rounding II
Write a script to round a variable x to 3 decimal places:
e.g. x = 2.3456 --> y = 2.346
5年弱 前
解決済み
Unit Matrix
Given n, you should return an n-by-n unit matrix.
Example:
If input is n=2 then
A = [ 1 0
0 1 ]
If input ...
5年弱 前
解決済み
Symmetry of vector
Determine whether the vector is symmetric or not (vector could be even or odd in length).
For example:
x = [1 2 3 3 2 1] ...
5年弱 前
解決済み
Back to basics 22 - Rotate a matrix
Covering some basic topics I haven't seen elsewhere on Cody.
Rotate the input matrix 90 degrees counterclockwise (e.g. [1 2; ...
5年弱 前
解決済み
Factorize THIS, buddy
List the prime factors for the input number, in decreasing order. List each factor only once, even if the factorization includes...
Back to basics 21 - Matrix replicating
Covering some basic topics I haven't seen elsewhere on Cody.
Given an input matrix, generate an output matrix that consists o...
5年弱 前
解決済み
Divide by 4
Given the variable x as your input, divide it by four and put the result in y.