2010年10月14日 星期四

MatLab -- find eigenvector and eigenvalue

from:http://www.mathworks.com/help/toolbox/fixedpoint/ref/mpower.html


a1= [-1.4 0.8;-2.4 1.8];

[VN,DN] = eig(a1,'nobalance')

MatLab -- find eigenvector and eigenvalue

from:http://www.mathworks.com/help/toolbox/fixedpoint/ref/mpower.html


a1= [-1.4 0.8;-2.4 1.8];

[VN,DN] = eig(a1,'nobalance')

Markov Chains , AND LIMIT

FROM:
http://aix1.uottawa.ca/~jkhoury/markov.htm

2010年10月6日 星期三

C++ file read

from:http://www.cplusplus.com/forum/beginner/8388/


#include
#include
using namespace std;

int main()
{
ifstream in("test", ios::in | ios::binary);

if(!in) {
cout << "Cannot open input file.\n";
return 1;
}

double num;
char str[80];

in.read((char *) &num, sizeof(double));
in.read(str, 14);
str[14] = '\0'; // null terminate str

cout << num << ' ' << str;

in.close();

return 0;
}