This function obtains a unitary MATRIX Q such that: d=diag(Q *diag(lmd)*Q).
In other words, it gives a way to generate a MATRIX with given eigenvalues and diagonal elements.
By Daniel Perez Palomar (last revision: May 10, 2004).
Feel free to distribute this file as it is (without including any modifications).
1) Write a function reverse(A) which takes a MATRIX A of arbitrary dimensions as input and returns a MATRIX B consisting of the columns of A in reverse order. Thus for example, if
A = 1 2 3 then B = 3 2 1
4 5 6 6 5 4
7 8 9 9 8 7
Write a main program to call reverse(A) for the MATRIX A = magic(5). Print to the screen both A and reverse(A).
2) Write a program which accepts an input k from the keyboard, and which prints out the smallest fibonacci number that is at least as large as k. The program should also print out its position in the fibonacci sequence. Here is a sample of input and output:
Enter k>0: 100
144 is the smallest fibonacci number greater than or equal to 100.
It is the 12th fibonacci number.
runs Kalman-Bucy filter over observations MATRIX Z
for 1-step prediction onto MATRIX X (X can = Z)
with model order p
V = initial covariance of observation sequence noise
returns model parameter estimation sequence A,
sequence of predicted outcomes y_pred
and error MATRIX Ey (reshaped) for y and Ea for a
along with inovation prob P = P(y_t | D_t-1) = evidence
MATRIX Transposition and Multiplication
It is a MIPS assembly program that does the following: given two matrices, M1 and M2, first transpose M2 to obtain M2tran. Then multiply M1 and M2tran.