![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
matlab
leeson23333
How to save the world
展开
-
用MATLAB计算平均值和方差mean&&mse
function [mean,mse ] = mse( input )%MSE get mean square error && average% by lee[n,d]=size(input);mean=0;mse=0;for i=1:n mean=mean+input(i);endmean=mean/nfor i=1:n mse=mse+(mean-inpu原创 2014-01-24 00:14:51 · 6519 阅读 · 0 评论 -
二分类 度量可分类程度指标Hindex IN ,matlab
二分类 度量可分类程度指标Hindex IN ,matlabfunction h = Hindex( pos,neg )%HINDEX compute hindex for class 2 classification% n-d will be fine[Np,dp]=size(pos);[Nn,dn]=size(neg);Ppos=Np/(Np+Nn);Pneg=Nn/(Np+原创 2014-01-24 00:19:26 · 869 阅读 · 0 评论 -
matlab 使用大全,随机,文件,运算(二)
1. 开方sqrt(5) 2.matlab的字符串中如何引入变量for i=1:5 for j=1:5s=['Images/',num2str(i),'_',num2str(j)] A=imread(s,'BMP'); endend3.取整:fix:向零取整floor:向小取整round:四舍五入ceil:向大取整4个函数原创 2014-02-24 22:37:17 · 1213 阅读 · 1 评论 -
随机森林调用matlab代码做回归
function Randomfre(set,numtrees )%利用随机森林进行训练跟预测% by YangLs=['rf/train_',num2str(set),'.rf'];trainall=load(s);[N D] =size(trainall);train=zeros(N,D);for i=1:D-1 for j=1:N train(j,原创 2014-02-24 22:41:24 · 25274 阅读 · 3 评论 -
在shell中调用matlab执行
1.如何在shell脚本中调用Matlabscript language就像灵活的瑞士军刀,但进行某些专业处理会力不从心。譬如复杂的数学运算、建模、复杂的文本处理会等等。没关系,专业的人做专业的事,同样,专业的工具干专业的活,我们可以借助外部工具帮忙,譬如matlab、C/C++,vim等等,下面以Matlab为例,简单描述一下如何用shell脚本产生m程序,并用matlab工转载 2014-05-03 13:27:54 · 6416 阅读 · 0 评论 -
ubuntu 1204 mex使用不能的解决办法
1. 安装gcc g++参考:http://stefaanlippens.net/cpp_mex_ubuntu804zhang@ubuntu-desktop:~$ sudo apt-get install gcc-4.3 g++-4.32. At the MATLAB Command Window prompt, type: >> mex -setup转载 2014-05-03 13:24:49 · 945 阅读 · 0 评论 -
关于shell调用matlab的一些注意事项么么哒
matlab -nodesktop -nosplash - nojvm -r "[command];"% command可以是script 但不需要添加后缀名.m原创 2014-05-04 22:21:33 · 1312 阅读 · 0 评论 -
install gcc-4.1.2 on ubuntu 12.04 (from someone else but add something)
$ wget http://ftp.gnu.org/gnu/gcc/gcc-4.1.2/gcc-4.1.2.tar.bz2$ tar xvjf gcc-4.1.2.tar.bz22. 安装依赖库, 以及软件$ sudo apt-get install libc6-dev libgmp-dev libmpfr-dev texinfo3. 为头文件以及所需库添加链接原创 2014-05-04 22:33:36 · 567 阅读 · 0 评论 -
Matlab数组、矩阵技巧
1.数组切割:A(,)ans(1,1:935) //第一行,1到935列ans(:,end) //所有行,最后列ans(:,select) //所有行,select所选的列2.数组排序:[sa,aindex]=sort(a,'descend') //跟随index排序3.数组合并:train=[n2 n3 n4 n5]train=[n2; n3; n4; n1]原创 2014-12-22 17:09:39 · 622 阅读 · 0 评论