iprompt.m

来自「MIMO and VBLAST( please see the document」· M 代码 · 共 29 行

M
29
字号
function [indent,gap,str] = iprompt(str);%IPROMPT Indent prompt.%   [INDENT,GAP,STRING] = IPROMPT(STRING) is usefull script %   which allows function echoes to be indented. The script returns%   an empty strings INDENT and GAP that are inserted in front of%   displayed text. Than you don't need to take care about prompt%   indenting any  more. To change indent formatting set the IDT%   variable to desired value. Default value for IDT is 11. This%   means that 11 blank spaces will inserted in front of the STRING.%  %   Example:%     [indent,gap,name] = iprompt('FUNCTION_HEADER:');%     disp(' ');%     disp([name,gap,'Some echo on the 1st line.']);%     disp([indent,'Some echo on the 2nd line.'])%     disp(' ');%   Copyright 2001-2002 Kamil Anis, anisk@feld.cvut.cz%   Dept. of Radioelectronics, %   Faculty of Electrical Engineering%   Czech Technical University in Pragu%   $Revision: 2.0 $  $Date: 2002/10/23 17:33:28 $%   --%   <additional stuff should go here>idt =  11;indent(1:idt) = ' ';gap(1:idt-length(str))=' ';

⌨️ 快捷键说明

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