杰

杰哥好,哈哈!
要有魄力,即使失败,也不要让自己的人生平庸! 如果您觉得看过的文章还不错,请帮我点一个右边广告(没有任何副作用),谢谢!
 
 

常用链接

  • 我的随笔
  • 我的评论
  • 我参与的随笔

留言簿(57)

  • 给我留言
  • 查看公开留言
  • 查看私人留言

随笔分类

  • Matlab(58) (rss)
  • Optimization(7) (rss)
  • Python(4) (rss)
  • Search(30) (rss)
  • 名人(9) (rss)
  • 软件使用(Software)(66) (rss)
  • 学术(102) (rss)

随笔档案

  • 2021年3月 (2)
  • 2021年2月 (1)
  • 2021年1月 (1)
  • 2020年10月 (1)
  • 2020年9月 (1)
  • 2019年2月 (1)
  • 2018年10月 (1)
  • 2018年9月 (2)
  • 2018年8月 (1)
  • 2018年7月 (2)
  • 2018年6月 (1)
  • 2018年5月 (1)
  • 2018年4月 (1)
  • 2018年3月 (4)
  • 2018年2月 (2)
  • 2018年1月 (1)
  • 2017年12月 (4)
  • 2017年11月 (2)
  • 2017年9月 (2)
  • 2017年8月 (1)
  • 2017年7月 (1)
  • 2017年6月 (4)
  • 2017年5月 (3)
  • 2017年4月 (1)
  • 2017年1月 (1)
  • 2016年12月 (8)
  • 2016年11月 (3)
  • 2016年10月 (3)
  • 2016年9月 (2)
  • 2016年8月 (2)
  • 2016年7月 (4)
  • 2016年6月 (6)
  • 2016年5月 (7)
  • 2016年4月 (1)
  • 2016年3月 (3)
  • 2016年2月 (1)
  • 2016年1月 (2)
  • 2015年12月 (6)
  • 2015年11月 (3)
  • 2015年10月 (4)
  • 2015年9月 (3)
  • 2015年8月 (5)
  • 2015年7月 (6)
  • 2015年6月 (7)
  • 2015年5月 (8)
  • 2015年4月 (9)
  • 2015年3月 (4)
  • 2015年2月 (1)
  • 2015年1月 (3)
  • 2014年12月 (4)
  • 2014年11月 (2)
  • 2014年10月 (5)
  • 2014年9月 (3)
  • 2014年8月 (5)
  • 2014年7月 (7)
  • 2014年6月 (4)
  • 2014年5月 (1)
  • 2014年4月 (1)
  • 2014年3月 (2)
  • 2013年12月 (4)
  • 2013年11月 (3)
  • 2013年9月 (4)
  • 2013年8月 (3)
  • 2013年7月 (6)
  • 2013年6月 (4)
  • 2013年5月 (1)
  • 2013年4月 (1)
  • 2013年3月 (2)
  • 2013年2月 (1)
  • 2013年1月 (3)
  • 2012年12月 (3)
  • 2012年11月 (10)
  • 2012年10月 (11)
  • 2012年9月 (2)
  • 2012年8月 (6)
  • 2012年7月 (6)
  • 2012年6月 (4)
  • 2012年5月 (1)
  • 2012年4月 (3)
  • 2012年3月 (5)
  • 2012年1月 (1)
  • 2011年12月 (1)
  • 2011年11月 (4)
  • 2011年10月 (3)
  • 2011年9月 (3)
  • 2011年8月 (1)
  • 2011年7月 (1)
  • 2011年6月 (2)
  • 2011年5月 (2)
  • 2011年2月 (1)
  • 2011年1月 (3)
  • 2010年12月 (7)
  • 2010年11月 (5)
  • 2010年10月 (7)
  • 2010年9月 (3)
  • 2010年8月 (7)
  • 2010年7月 (7)
  • 2010年5月 (5)
  • 2010年3月 (6)
  • 2010年1月 (5)
  • 2009年12月 (5)
  • 2009年11月 (4)
  • 2009年10月 (5)
  • 2009年9月 (4)
  • 2009年8月 (1)
  • 2009年7月 (2)
  • 2009年6月 (3)
  • 2009年5月 (1)
  • 2009年4月 (3)
  • 2009年3月 (5)
  • 2009年2月 (2)
  • 2009年1月 (1)
  • 2008年12月 (1)
  • 2008年10月 (1)
  • 2008年9月 (1)
  • 2008年8月 (1)
  • 2008年7月 (4)
  • 2008年5月 (2)
  • 2008年1月 (1)
  • 2006年11月 (1)
  • 2006年4月 (1)

相册

  • 搞笑图片

Other

  • 安徽电力公司客服网站
  • 编程
  • 程序员联合开发网
  • 经典歌曲
  • 两全其美
  • 新雨丝
  • 中国工商银行
  • 中国建设银行
  • 中国建设银行信用卡
  • 中国农业银行

Paper submission

  • ACM Computing Surveys
  • AI in medicine
  • amino acids
  • Artificial Intelligence Review
  • Bioinformatics
  • BMCBioinformatics
  • conference Rankings
  • conference(CVPR)
  • conference(ICML)
  • conference(NIPS)
  • conferences
  • Current Bioinformatics
  • CVIU
  • Electronics Letters
  • IJCM
  • IJCV
  • IJPRAI
  • Image and Vision Computing
  • Neural Computing and Applications (NCA)
  • Neural Networks
  • Neurocomputing
  • Pattern Recognition
  • Pattern Recognition Letters
  • pieee
  • TASE
  • TBD
  • Tbiom
  • TCDS
  • TCSS
  • TCSVT
  • TCYB
  • TDSC
  • TGRS
  • TIFS
  • TII
  • TIP
  • TKDE
  • TMM
  • TNNLS
  • TPAMI
  • TSMCS
  • TVT

福彩

  • 安徽福彩网
  • 双色球玩法规则介绍

留学相关

  • Google翻译
  • 爱词霸在线词典
  • 美国总领事馆
  • 普特英语听力
  • 太傻论坛
  • 在线科技词典

论坛

  • 科大bbs
  • 科学岛论坛
  • 模式识别爱好者论坛

搜索

  • arxiv
  • google ipv6
  • google台湾
  • google香港
  • google学术搜索
  • Journal citation reports (JCR)
  • scholarpedia
  • wikipedia维基百科
  • 北京天气预报
  • 电驴
  • 合肥天气预报
  • 乐乎(下载电影)
  • 微软学术搜索

学者

  • Dacheng tao
  • Deng Cai
  • Dengyong Zhou
  • dodo
  • Jian Yang
  • Jie Gui
  • Meina Kan
  • Tianyi Zhou
  • Tongliang Liu
  • Weifeng Liu
  • Xiaojin Zhu
  • yong xu (hit)
  • Zhen Lei (ia)
  • 桂卫华
  • 中科院水生所所长桂建芳

邮箱

  • 126邮箱abroad
  • 126邮箱国内
  • google 邮箱
  • hotmail
  • Seu (东南大学)
  • 科大校友邮箱
  • 科大邮箱
  • 中科院

中科大和中科院

  • Niu Group (inside)
  • Niu Group (Outside)
  • 合肥研究院图书馆
  • 智能所

搜索

  •  

最新评论

  • 1. re: Office 2010中删除Endnote web 插件
  • 真是救了我呀!
  • --ss
  • 2. re: metric learning(度量学习)
  • 76765
  • --656
  • 3. re: 全新的美国计算机学科排名[未登录]
  • 随便拉出一个来就能秒天朝的 北*大学,清*大学到火星...
  • --chipset
  • 4. re:【超智多能思维科学研究所】致 蒲慕明教授的eMail
  • 评论内容较长,点击标题查看
  • --江伟
  • 5. re: Adobe distiller: Cambria not found, using Courier. 报错解决办法
  • 解决了,谢谢!
  • --lyh

阅读排行榜

  • 1. [转贴]Google被封、gmail.com邮箱、gmail登录不了的办法(25675)
  • 2. arg min的含义是什么?(24487)
  • 3. latex问题集锦(19440)
  • 4. matlab命令窗口输出函数disp和display(17328)
  • 5. MATLAB字符串数组(15451)

评论排行榜

  • 1. K近邻分类器的matlab代码(Matlab code of k-nearest neighbors)(13)
  • 2. LibSVM学习记录(6)
  • 3. 全国接听免费附加套餐(5)
  • 4. EndNote 乱码 解决方案(5)
  • 5. 孟岩blog理解矩阵一、二, 三(5)

Powered by: 博客园
模板提供:沪江博客
C++博客 | 首页 | 发新随笔 | 发新文章 | 联系 | 聚合 | 管理

Multi-label K-nearest neighbor (ML-KNN)
注意点:MLKNN_train注释部分有train_target - A QxM array, if the ith training instance belongs to the jth class, then train_target(j,i) equals +1, otherwise train_target(j,i) equals -1  。如果设置成1和0可以吗?不行,因为MLKNN_test有如下代码:
for i=1:num_testing
        for j=1:num_class
            if(Outputs(j,i)>=0.5)
                Pre_Labels(j,i)=1;
            else
                Pre_Labels(j,i)=-1;
            end
        end
    end
HammingLoss=Hamming_loss(Pre_Labels,test_target);
再看HammingLoss代码,要比较Pre_Labels和test_target,Pre_Labels是1和-1,如果test_target 是1和0就会出错
MLKNN_test程序中最后几句    HammingLoss=Hamming_loss(Pre_Labels,test_target);    RankingLoss=Ranking_loss(Outputs,test_target);OneError=One_error(Outputs,test_target);
    Coverage=coverage(Outputs,test_target);Average_Precision=Average_precision(Outputs,test_target);HammingLoss是基于输出标号和实际标号,其余均是基于输出概率和实际标号

Understand completely the meaning and matlab code of  HammingLoss, the matlab code is very simple. 

posted @ 2012-08-01 15:40 杰哥 阅读(1552) | 评论 (4) | 编辑 收藏
 
matlab中计算距离矩阵的简洁代码
20120702 Libing wang recommend:
[nSmp nFea]=size(fea);
Dis = pdist2(fea,fea);
------------------------------------------【以下可不看】 ------------------------------------------- 
%能不用循环尽量不用循环
[nSmp nFea]=size(fea);
normfea = sum(fea .^2,2);
Dis = -2*fea*fea'+repmat(normfea,1,nSmp)+repmat(normfea',nSmp,1);
Dis(Dis<=0)  = 0;%有次程序运行,发现对角线上有很小的非零的值,应该是计算精度的问题
Dis = sqrt(Dis);
posted @ 2012-07-27 08:44 杰哥 阅读(1080) | 评论 (0) | 编辑 收藏
 
What is the role of orthogonal constrain?
In Patch Alignment for Dimensionality Reduction (TKDE 2009), orthogonal constrain is defined in Eq. (7) and (8). Tianyi said that,正交约束有两个作用,(1)希望U的各个列尽可能线性无关(线性代数上,两个向量正交一定是线性无关的。注意与概率论与数理统计上相关系数区别,分别看两者定义);(2)防止U为0。
这二个作用对分类可能意义不大。他的Manifold elastic net因为投影矩阵不会为零,故没有加正交约束

Sparsity preserving projections with applications to face recognition的公式19下面,为什么引入约束,就这么一句:
To avoid degenerate solutions, we constrain (w^T)X(X^T)w = 1.

Manifold Regularized Discriminative Nonnegative的公式10; Unsupervised Feature Selection Using Nonnegative Spectral Analysis的公式9到10 的转换,将正交约束进行转换
posted @ 2012-07-26 17:10 杰哥 阅读(383) | 评论 (0) | 编辑 收藏
 
[zz]典型关联分析(Canonical Correlation Analysis)

[pdf版本] 典型相关分析.pdf

posted @ 2012-07-19 20:34 杰哥 阅读(573) | 评论 (0) | 编辑 收藏
 
多变量有约束 等式约束 拉格朗日乘子法
http://zh.wikipedia.org/wiki/%E6%8B%89%E6%A0%BC%E6%9C%97%E6%97%A5%E4%B9%98%E6%95%B0 
在维基上搜索“拉格朗日乘数”即可

例子

[编辑]很简单的例子

求此方程的最大值:

 f(x, y) = x^2 y

同时未知数满足

 x^2 + y^2 = 1

因为只有一个未知数的限制条件,我们只需要用一个乘数\lambda.

g (x, y) = x^2 +y^2 -1
\Phi (x, y, \lambda) = f(x,y) + \lambda g(x, y) = x^2 y + \lambda (x^2 + y^2 - 1)

将所有\Phi方程的偏微分设为零,得到一个方程组,最大值是以下方程组的解中的一个:

2 x y + 2 \lambda x = 0
x^2 + 2 \lambda y = 0
x^2 + y^2 -1 = 0

[编辑]另一个例子

求此离散分布的最大熵:

f(p_1,p_2,\ldots,p_n) = -\sum_{k=1}^n p_k\log_2 p_k.

所有概率的总和是1,因此我们得到的约束是g(p)= 1即

g(p_1,p_2,\ldots,p_n)=\sum_{k=1}^n p_k=1.

可以使用拉格朗日乘数找到最高熵(概率的函数)。对于所有的k 从1到n,要求

\frac{\partial}{\partial p_k}(f+\lambda (g-1))=0,

由此得到

\frac{\partial}{\partial p_k}\left(-\sum_{k=1}^n p_k \log_2 p_k + \lambda (\sum_{k=1}^n p_k - 1) \right) = 0.

计算出这n个等式的微分,我们得到:

-\left(\frac{1}{\ln 2}+\log_2 p_k \right) + \lambda = 0.

这说明pi都相等 (因为它们都只是λ的函数). 解出约束∑k pk = 1,得到

p_k = \frac{1}{n}.

因此,使用均匀分布可得到最大熵的值。

posted @ 2012-07-16 09:25 杰哥 阅读(1166) | 评论 (0) | 编辑 收藏
 
Approximate Message Passing (AMP) Code for Compressive Sensing.

http://nuit-blanche.blogspot.com.au/2011/06/approximate-message-passing-amp-code.html 
Tianyi told me that this is the farthest and most convenient sparse package. Only needs two or three lines of code. But this can not be used for sparse representation based classification. 天翼说要求高斯分布,不太清楚什么意思。要加速SRC,可以采用http://www.ugcs.caltech.edu/~srbecker/中的TFOCS,他也没用过,知道原理。也可以用Zhen James Xiang的NIPS 2011

posted @ 2012-07-11 11:54 杰哥 阅读(922) | 评论 (2) | 编辑 收藏
 
geometric mean几何平均值、算术平均值、调和平均值

geometric mean

 我们知道算术平均数,(a+b)/2,体现纯粹数字上的关系,

  而根号ab,称为几何平均数,这个体现了一个几何关系,

  即过一个圆的直径上任意一点做垂线,直径被分开的两部分为a,b,

  那么那个垂线在圆内的一半长度就是根号ab,并且

  (a+b)/2>=根号ab!

  这就是它的几何意思,也是称之为几何平均数的原因。

      几何平均值


  几何平均值
  

如果有n个数a1、a2、……、an,则几何平均值为这n个数乘积开n次方根的值,与代数平均值(a1+a2+ …… +an)/n不同。
  比如,对于a,b,有几何平均值√(aXb)。 
      harmonic mean
  如果存在X1、X2……Xn,xi≠0、i=1,2,..,n,H= n/(1/X1+1/X2+……+1/Xn)。其中H即为X1、X2……Xn的调和平均值。 
参考资料:
http://baike.soso.com/v359908.htm?ch=ch.bk.innerlink 
http://baike.baidu.com/view/4666331.htm
http://baike.baidu.com/view/1117131.htm 



posted @ 2012-07-11 07:27 杰哥 阅读(1042) | 评论 (0) | 编辑 收藏
 
How to write algorithm and pseudocode in Latex ?\usepackage{algorithm},\usepackage{algorithmic}

http://www.math-linux.com/spip.php?article129 
We must use the following packages

\usepackage{algorithm}
\usepackage{algorithmic}


见我gmail Sep 19, 2012和gmail Oct 22, 2013 的例子:\STATE本身就具有换行功能,不必要加\\。要粗体,{\bfseries Solve}
希望每一行加一个序号1,2等,用\begin{algorithmic} [1]代替\begin{algorithmic};

例1:gmail Oct 22, 2013 的例子的简略版

\renewcommand{\algorithmicrequire}{\textbf{Initialization:}} %\renewcommand见Latex教材P18,修改已有命令;\textbf见Latex教材P99,粗体的意思;
\renewcommand{\algorithmicensure}{\textbf{Iteration:}}
\begin{algorithm}[htbp]
\caption{Label}
\begin{algorithmic}[1]
\REQUIRE ~~\\ %与上面的\renewcommand{\algorithmicrequire}{\textbf{Initialization:}}对应
The initial optimization 
\ENSURE ~~\\
\FOR {each node }
  \STATE Get the value
\ENDFOR
\renewcommand{\algorithmicrequire}{\textbf{Output:}}
\REQUIRE ~~\\
 \STATE Return label
\end{algorithmic}
\end{algorithm}

例2:Here is an exemple:
\begin{algorithm}
\caption{Calculate $y = x^n$}
\begin{algorithmic} 
\REQUIRE $n \geq 0 \vee x \neq 0$
\ENSURE $y = x^n$
\STATE $y \leftarrow 1$
\IF{$n < 0$}
\STATE $X \leftarrow 1 / x$
\STATE $N \leftarrow -n$
\ELSE
\STATE $X \leftarrow x$
\STATE $N \leftarrow n$
\ENDIF
\WHILE{$N \neq 0$}
\IF{$N$ is even}
\STATE $X \leftarrow X \times X$
\STATE $N \leftarrow N / 2$
\ELSE[$N$ is odd]
\STATE $y \leftarrow y \times X$
\STATE $N \leftarrow N - 1$
\ENDIF
\ENDWHILE
\end{algorithmic}
\end{algorithm}
Upload


问题:The floating object algorithm doesn't behave well with beamer (which onviously disables floating objects). To prevent problems you can 1) use the H placement specifier for algorithm. This works well for my talk: "talk\2017\I\1\Jie Gui_3\Multi-view".

Reference:
https://tex.stackexchange.com/questions/26539/beamer-and-pseudocode

---------------------------------------------------以下暂不看-------------------------------------------------------
选自:
http://nckunoname.pixnet.net/blog

http://blog.sina.com.cn/s/blog_5e16f1770102ezhv.html

 

網路上查了很多資料關於"用LaTeX寫algorithm"

自己稍微整理一下

algorithm排版可能需要的套件

\documentclass[journal]{IEEEtran}
\usepackage{algorithm}
%\usepackage{algorithmic}
\usepackage{algpseudocode}
\usepackage{amsmath}
\usepackage{graphics}
\usepackage{epsfig}

其中algorithmic在compile時會出現

! LaTex Error: Command \algorithm already defined.

Or name \end... illegal, see p.192 of the manual

原因不是很清楚,所以只好先mark掉

\renewcommand{\algorithmicrequire}{\textbf{Input:}} % Use Input in the format of Algorithm
\renewcommand{\algorithmicensure}{\textbf{Output:}} % Use Output in the format of Algorithm

網路上範例一:
\begin{algorithm}[htb]
\caption{ Framework of ensemble learning for our system.}
\label{alg:Framwork}
\begin{algorithmic}[1]
\Require
The set of positive samples for current batch, $P_n$;
The set of unlabelled samples for current batch, $U_n$;
Ensemble of classifiers on former batches, $E_{n-1}$;
\Ensure
Ensemble of classifiers on the current batch, $E_n$;
\State Extracting the set of reliable negative and/or positive samples $T_n$ from $U_n$ with help of $P_n$;
\label{code:fram:extract}
\State Training ensemble of classifiers $E$ on $T_n \cup P_n$, with help of data in former batches;
\label{code:fram:trainbase}
\State $E_n=E_{n-1}cup E$;
\label{code:fram:add}
\State Classifying samples in $U_n-T_n$ by $E_n$;
\label{code:fram:classify}
\State Deleting some weak classifiers in $E_n$ so as to keep the capacity of $E_n$;
\label{code:fram:select} \\
\Return $E_n$;
\end{algorithmic}
\end{algorithm}

排版效果圖:
clip_image001

網路上範例二:

\begin{algorithm}[h]
\caption{An example for format For \& While Loop in Algorithm}
\begin{algorithmic}[1]
\For{each $i\in [1,9]$}
\State initialize a tree $T_{i}$ with only a leaf (the root);
\State $T=T\cup T_{i};$
\EndFor
\ForAll {$c$ such that $c\in RecentMBatch(E_{n-1})$}
\label{code:TrainBase:getc}
\State $T=T\cup PosSample(c)$;
\label{code:TrainBase:pos}
\EndFor;
\For{$i=1$; $i<n$; $i++$ }
\State $//$ Your source here;
\EndFor
\For{$i=1$ to $n$}
\State $//$ Your source here;
\EndFor
\State $//$ Reusing recent base classifiers.
\label{code:recentStart}
\While {$(|E_n| \leq L_1 )and( D \neq \phi)$}
\State Selecting the most recent classifier $c_i$ from $D$;
\State $D=D-c_i$;
\State $E_n=E_n+c_i$;
\EndWhile
\label{code:recentEnd}
\end{algorithmic}
\end{algorithm}

排版效果圖:
clip_image002

個人範例:

\begin{algorithm}[h]
\caption{Conjugate Gradient Algorithm with Dynamic Step-Size Control}
\label{alg::conjugateGradient}
\begin{algorithmic}[1]
\Require
$f(x)$: objective funtion;
$x_0$: initial solution;
$s$: step size;
\Ensure
optimal $x^{*}$
\State initial $g_0=0$ and $d_0=0$;
\Repeat
\State compute gradient directions $g_k=\bigtriangledown f(x_k)$;
\State compute Polak-Ribiere parameter $\beta_k=\frac{g_k^{T}(g_k-g_{k-1})}{\parallel g_{k-1} \parallel^{2}}$;
\State compute the conjugate directions $d_k=-g_k+\beta_k d_{k-1}$;
\State compute the step size $\alpha_k=s/\parallel d_k \parallel_{2}$;
\Until{($f(x_k)>f(x_{k-1})$)}
\end{algorithmic}
\end{algorithm}

排版效果圖:
clip_image003

先前所使用的套件為algorithm或algorithmic

接下來介紹另一個寫algorithm的套件alogrithm2e

首先使用\usepackage指令
\usepackage[linesnumbered,boxed]{algorithm2e}
接下來是網路範例:
\begin{algorithm}
\caption{identifyRowContext}
\KwIn{$r_i$, $Backgrd(T_i)$=${T_1,T_2,\ldots ,T_n}$ and similarity threshold $\theta_r$}
\KwOut{$con(r_i)$}
$con(r_i)= \Phi$\;
\For{$j=1;j \le n;j \ne i$}
{
float $maxSim=0$\;
$r^{maxSim}=null$\;
\While{not end of $T_j$}
{
compute Jaro($r_i,r_m$)($r_m\in T_j$)\;
\If{$(Jaro(r_i,r_m) \ge \theta_r)\wedge (Jaro(r_i,r_m)\ge r^{maxSim})$}
{
replace $r^{maxSim}$ with $r_m$\;
}
}
$con(r_i)=con(r_i)\cup {r^{maxSim}}$\;
}
return $con(r_i)$\;
\end{algorithm}
排版效果圖:
clip_image004

延伸幾個問題:

一、如何修改Algorithm的標題為中文的"演算法”?

在\begin{document}之前加入\renewcommand{\algorithmcfname}{算法} 即可(註:需先安裝中文字形)

二、如何去掉演算法中的豎線?

加入 \SetAlgoNoLine 指令在\begin{algorithm}之後

排版效果圖:

clip_image005

三、還可以使用其他標題樣式?

也可以使用\usepackage[ruled,vlined]{algorithm2e}
排版效果圖:

clip_image006

其他樣式可以參考:http://mirror.bjtu.edu.cn/CTAN/macros/latex/contrib/algorithm2e/algorithm2e.pdf

關於algorithm2e還有以下一些information
The algorithm2e LaTeX package conflicts with several others over the use of the algorithm identifier.

A common indicator is something like this message: Too many }'s.l.1616 }

To resolve the issues, simply put the following just before the inclusion of the algorithm2e package:

\makeatletter
\newif\if@restonecol
\makeatother
\let\algorithm\relax
\let\endalgorithm\relax


 

posted @ 2012-06-28 09:15 杰哥 阅读(5805) | 评论 (0) | 编辑 收藏
 
Latex template (Springer) (*.bst)
该模板在哪里下载?
http://www.springer.com/computer/image+processing/journal/11263,
Instructions for Authors,Text中下载
nannan投稿IJCV,发现参考文献格式有问题,找了很久也没找到原因。后来看spbasic.bst(有三个bst文件,选哪个呢?该文件前面有说明: For Springer medical, life sciences, chemistry, geology, engineering and  computer science publications. )
解决方案: 加了工具包\usepackage[numbers]{natbib} 就没有问题了,在文件中有说明:
When citations are numbered, please use \usepackage[numbers]{natbib}.

20231021, 以上方案解决不了,https://blog.csdn.net/weixin_46337516/article/details/129460309?utm_medium=distribute.pc_relevant.none-task-blog-2~default~baidujs_baidulandingword~default-0-129460309-blog-120388265.235^v38^pc_relevant_anti_t3&spm=1001.2101.3001.4242.1&utm_relevant_index=3,sn-mathphys.bst移到和tex文件同级目录即可解决

如果只想在引用处出现年份,用 \citeyear{key} ,在文件中有如下说明:
  % The \cite command functions as follows:
 %   \citet{key} ==>>                Jones et al. (1990)
 %   \citet*{key} ==>>               Jones, Baker, and Smith (1990)
 %   \citep{key} ==>>                (Jones et al., 1990)
 %   \citep*{key} ==>>               (Jones, Baker, and Smith, 1990)
 %   \citep[chap. 2]{key} ==>>       (Jones et al., 1990, chap. 2)
 %   \citep[e.g.][]{key} ==>>        (e.g. Jones et al., 1990)
 %   \citep[e.g.][p. 32]{key} ==>>   (e.g. Jones et al., p. 32)
 %   \citeauthor{key} ==>>           Jones et al.
 %   \citeauthor*{key} ==>>          Jones, Baker, and Smith
 %   \citeyear{key} ==>>             1990
posted @ 2012-06-24 20:55 杰哥 阅读(7905) | 评论 (0) | 编辑 收藏
 
matlab中对一个矩阵的行(列)归一化为二范数是1的简洁代码:一句实现
% You can also use http://www.cad.zju.edu.cn/home/dengcai/Data/code/NormalizeFea.m.

matlab中对一个矩阵的行(列)归一化为二范数是1的简洁代码:一句实现
%  normalize each row to unit
A = A./max(1e-12,repmat(sqrt(sum(A.^2,2)),1,size(A,2)));% 1e-12 is similar as %http://www.cad.zju.edu.cn/home/dengcai/Data/FaceData.html to avoid the problem that one row of A is zero
%  normalize each column to unit
A = A./max(1e-12,repmat(sqrt(sum(A.^2,1)),size(A,1),1));
% % Nannan wang says that in matlab, cycling(循环) is time-consuming.
% % 能不用循环就不用循环
% % Examples
% A=[3 4;5 12];
% [m n] = size(A);
% % normalize each row to unit
% for i = 1:m
%     A(i,:)=A(i,:)/norm(A(i,:));
% end
% A
% % another beautiful way to normalize each row to unit
% A=[3 4;5 12];
% A = A./repmat(sqrt(sum(A.^2,2)),1,size(A,2));
% A
% 
% 
% % normalize each column to unit
% A=[3 4;5 12];
% for i = 1:n
%     A(:,i)=A(:,i)/norm(A(:,i));
% end
% A
% % another beautiful way to normalize each column to unit
% A=[3 4;5 12];
% A = A./repmat(sqrt(sum(A.^2,1)),size(A,1),1);
% A  
posted @ 2012-06-18 13:36 杰哥 阅读(4589) | 评论 (2) | 编辑 收藏
 
仅列出标题
共39页: First 21 22 23 24 25 26 27 28 29 Last