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

📄 shapelike.sci

📁 小波分解源代码
💻 SCI
字号:
function vec = ShapeLike(sig,proto)
// ShapeLike -- Make 1-d signal with given shape
//  Usage
//    vec = ShapeLike(sig,proto)
//  Inputs
//    sig      a row or column vector
//    proto    a prototype shape (row or column vector)
//  Outputs
//    vec      a vector with contents taken from sig
//             and same shape as proto
//
//  See Also
//    ShapeAsRow
//
//  Copyright Aldo I Maalouf

	sp = size(proto);
	ss = size(sig);
	if( sp(1)>1 & sp(2)>1 )
	   disp('Weird proto argument to ShapeLike')
	elseif ss(1)>1 & ss(2) > 1,
	   disp('Weird sig argument to ShapeLike')
	else
	   if(sp(1) > 1),
		  if ss(1) > 1,
			 vec = sig;
		  else
			 vec = sig(:);
		  end
	   else
		  if ss(2) > 1,
			 vec = sig;
		  else
			 vec = sig(:)';
		  end
	   end
	end
	endfunction
    

⌨️ 快捷键说明

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