Mar 15, 2010

small bugs haunting me

C++:

; is important in class{};
string is in using namespace std;
fabs not abs
-> . :: thing

Mar 10, 2010

c++ call matlab




long time from c++, suffering from small bugs,
yes, c++ is a bug itself.
before i start, i would like to log this bugs:
cout &it&it fixed &it&it setprecision(5) &it&it x
yes, if x is float, and you want to output it to file or console, then you get nothing.
same with textread in matlab, but you get something instead of nothing.

ok, let us start.


C++ call matlab
remember, what we are using are some libs of matlab, which is mainly the "engine" lib.
1) so add includes, add lib search path. add libs themselves.
2) coding

#include " engine.h"


Mar 4, 2010

14 Challenges of 21st Century[From USA NAE]

This is cited from USA National Academy of Engineering.
  1. Make solar energy affordable
  2. Provide energy from fusion
  3. Develop carbon sequestration methods
  4. Manage the nitrogen cycle
  5. Provide access to clean water
  6. Restore and improve urban infrastructure
  7. Advance health informatics
  8. Engineer better medicines
  9. Reverse-engineer the brain
  10. Prevent nuclear terror
  11. Secure cyberspace
  12. Enhance virtual reality
  13. Advance personalized learning
  14. Engineer the tools for scientific discovery

Mar 2, 2010

dynamic system

Dynamic system follows a fixed rule, which can be formulated by:
y(t+1) = A[y(t),y(t-1)...y(t-M)] + K[u(t)]
So the rule and initial value determine the whole time serials.