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

📄 ltindex.m

📁 马尔科夫链蒙特卡洛模拟的matlab源代码
💻 M
字号:
% LTINDEX - Lower Triangular Index% Copyright (c) 1998, Harvard University. Full copyright in the file Copyright%%  [irow, icol] = ltindex(index, dim) ;%% If a lower triangular matrix is packed in to a vector (column wise),% this calculates the matching row and column in the matrix for a % given index and dimension. (1,p) -> (1,1), (2,p) -> (2,1),% (p+1,p) -> (2,2), etc.%% See also:  LTVEC%function [irow, icol] = ltindex(index, dim) ;irow = index ;icol = 1 ;while irow>dim & icol<= dim,  icol = icol+1 ;  irow = irow - dim + (icol-1) ;endif icol>dim,  disp(sprintf('Error: ltindex: index=%d is too big for dim=%d',index,dim));  irow=NaN ;  icol=NaN ;  end

⌨️ 快捷键说明

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