中括号的含义?! `) D/ ^5 D. ^8 w0 N5 X! h
function quickplot(fun,xlim) 7 H4 h: ` M# Smsg=nargchk(2,2,nargin);7 n2 M$ ]% Z1 x2 G' {- c& g6 s8 B
error(msg);8 I# h5 X& C5 P
if (size(xlim,1)==1 & size(xlim,2)==2) | (size(xlim,2)==1 & size(xlim,1)==2) 5 t$ [$ K4 a, _$ E6 } r! V6 P n_steps=100;: S3 U4 G' f3 w# E
step_size=(xlim(2)-xlim(1))/n_steps;, S; Y. V6 \* W! a2 A
x=xlim(1):step_size:xlim(2);& s9 A4 X% L4 B q4 r
y=feval(fun,x);0 U+ @" a! T* ~3 i) r2 S
plot(x,y);) W- S( h. x+ ^" z+ o; k
title(['\bfPlot of function' fun '(x)']); 0 Q. a) [ p$ d/ | xlabel('\bfx'); . @& S4 P, k& N9 b6 X" v2 I' m ylabel(['\bf' fun '(x)']);: D6 m8 \) o8 z- V9 ]1 Q( E
else % T5 M. K4 J) O8 w error('Incorrect number of elements in xlim.');+ z. t$ i, ]+ f+ p2 @2 r
end " `4 O# U" o2 ^/ g% L, r 7 f" G/ b5 K* d0 u4 x8 I这个函数中,title(['\bfPlot of function' fun '(x)']);和ylabel(['\bf' fun '(x)']);这两句,为何要加中括号?不加中括号会出错!