- 博客(9)
- 资源 (10)
- 收藏
- 关注
原创 orth,
B = orth(A) 返回矩阵A的正交基,B的列与A的列具有相同的空间,B的列向量是正交向量,满足B'*B = eye(rank(A)),B的列数是A的秩。 应用举例 A=[4 0 0;0 3 1;0 1 3]; B=orth(A) Q=B'*B B = 0 1.0000 0 -0.7071 0 -0.7071 -0.7071 0 0.7071 Q = 1.0000 0 0
2012-06-19 16:25:21 10300
原创 randn,randperm,rand
rand是0-1的均匀分布 randn是均值为0方差为1的正态分布 rand(n)或randn(n)生成n*n的随机数矩阵 rand(n,m)或randn(m,n)生成m*n的随机数矩阵 randperm(n)会返回一个1维数组(向量),该数组是整数1到n的一组随机排列,彼此无重复,顺序随机。 >> randn(2) ans = -1.1193 -1.5255 -
2012-06-19 16:14:18 3345
原创 稀疏表达相关的资料总结
首先是介绍稀疏表达的博文 稀疏表达:向量、矩阵与张量(上) http://www.cvchina.info/2010/06/01/sparse-representation-vector-matrix-tensor-1/ 稀疏表达:向量、矩阵与张量(中) http://www.cvchina.info/2010/07/13/sparse_representation_vector_
2012-06-18 15:46:43 1119
转载 彻底卸载Office 2010:Office 2010清理工具
又是卸载教程(没办法网速慢无法上传其他软件),是关于卸载Office 2010的,我在用Office 2010,前段时间还为Office 2007和Office 2010的冲突而苦恼。 最近发现很多网友在卸载Office 2010时遇到问题,如果你有遇到无法正常卸载Office 2010的情况,如通过控制面板的添加/删除程序,可以试用下Remove Office 2007这个小工具。
2012-06-17 12:49:40 15809
原创 函数模版中的引用
一:函数模版和特化模版的引用 1.首先考虑特化函数模版的参数 #include "stdafx.h" #include #include #include template int compare( T ls, T rs) { if(ls<rs) return -1; if(rs<ls) return 1; return 0; } template<> int c
2012-06-16 12:19:36 825
原创 virtual constructor
#include "stdafx.h" # include #include #include class Monster { public: virtual void show() = 0; }; class SillyMonster : public Monster { public: virtual void show() { std::cout<<"i'm silly mons
2012-06-13 16:17:04 1463
原创 返回指向局部变量指针的函数 与 返回局部变量引用的函数
#include "stdafx.h" #include #include #include int& rref() { int i = 11; return i; } int* rpot() { int j = 33; return &j; } int _tmain(int argc, _TCHAR* argv[]) { int &a = rref(); int *b =
2012-06-13 15:37:00 1043
原创 诡异的函数模版实例化
templateint compare( const T a, const T b) { std::cout<<a<<" compare "<<b<<" result is "; if(a<b) return -1; if(b<a) return 1; return 0; } 如上简单的函数模版却遇到了相当多无法理解的问题。运行如下代码 int x(2); std:
2012-06-10 20:20:23 823
原创 函数模板特化 遇到 函数重载
#include"stdafx.h" #include #include #include template class Foo { public: static long count(){return ctr;} private: static long ctr; }; template long Foo::ctr = 11; template int compare(const
2012-06-06 18:13:02 977
算法导论第三版英文原版 带书签Introduction to Algorithms, Third Edition
2013-06-18
书店设计 频率设计 频率测量的重要手段之一
2009-12-31
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人