?? vec2str.m
字號(hào):
function s = vec2str(v)% Converts a vector (column or row) to a string that% prints on one line, with square brackets at both ends.% If v is a column vector, the elements are separated by ';'.%Input: v - vector to be converted%Output: s - string representation of v %%%%%%%%%%%%%%%%%%% vec2str.m %%%%%%%%%%%%%%%%%%%% Discrete-Time Control Problems using %% MATLAB and the Control System Toolbox %% by J.H. Chow, D.K. Frederick, & N.W. Chbat %% Brooks/Cole Publishing Company %% September 2002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%[nrows,ncols] = size(v);if nrows > ncols, sep_str = '; '; else sep_str = ' ';ends = '[';for i = 1:length(v), s = [s num2str(v(i))]; if i < length(v), s = [s sep_str]; endends = [s ']'];%%%%%%%%%%
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -