⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 stoch.m

📁 上载文件为Matlab环境下的高斯以马尔科夫模型例程
💻 M
字号:
function p=stoch(p)% Row-normalize matrices, making sure rows are positive and sum to 1if ndims(p)>2, error('Can only normalize matrices and vectors'); end;p=abs(p);[r,c]=size(p);if min(r,c)>1,  q=sum(p,2);				% row sums  if any(q==0) keyboard; end;  w=warning;warning('off');  p=vprod(1./q,p);  warning(w);  if ~all(q),    p(isnan(p))=1./c;  end;else  q=sum(p);  if q==0,    p=p+1./max(r,c);  else    p=p./q;  end;end;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -